Make everything epic and turn numbered list into Step elements

This commit is contained in:
Captain Jack Sparrow 2024-04-26 03:34:32 +00:00
parent bb31af7ca2
commit 5349909afa
12 changed files with 596 additions and 304 deletions

View file

@ -1,4 +1,4 @@
# sudo-flix docs # sudo-flix docs
Find it at https://sussy-code.github.io/docs Find it at https://docs.sudo-flix.lol

View file

@ -22,57 +22,59 @@ This method provides a straightforward setup with minimal configuration. For mor
* **Docker Compose:** Install Docker Compose following the instructions for your operating system: [Docker-Compose installation](https://docs.docker.com/compose/install/) * **Docker Compose:** Install Docker Compose following the instructions for your operating system: [Docker-Compose installation](https://docs.docker.com/compose/install/)
**Setup** **Setup**
1. **Create `docker-compose.yml`:** <Steps>
<Steps.Step>
```yaml **Create `docker-compose.yml`:**
version: '3.8' ```yaml
version: '3.8'
services: services:
postgres: postgres:
image: postgres image: postgres
environment: environment:
POSTGRES_USER: movie_web_user POSTGRES_USER: movie_web_user
POSTGRES_DB: movie_web_backend POSTGRES_DB: movie_web_backend
POSTGRES_PASSWORD: YourPasswordHere POSTGRES_PASSWORD: YourPasswordHere
ports: ports:
- "5432:5432" - "5432:5432"
networks: networks:
- sudo-flix-network - sudo-flix-network
sudo-flix:
sudo-flix: image: ghcr.io/sudo-flix/backend:latest
image: ghcr.io/sudo-flix/backend:latest environment:
environment: MWB_POSTGRES__CONNECTION: postgresql://movie_web_user:YourPasswordHere@postgres:5432/movie_web_backend
MWB_POSTGRES__CONNECTION: postgresql://movie_web_user:YourPasswordHere@postgres:5432/movie_web_backend MWB_CRYPTO__SESSION_SECRET: 32CharacterLongStringHere
MWB_CRYPTO__SESSION_SECRET: 32CharacterLongStringHere MWB_META__NAME: unofficial-sudo-flix
MWB_META__NAME: unofficial-sudo-flix MWB_POSTGRES__MIGRATE_ON_BOOT: "true"
MWB_POSTGRES__MIGRATE_ON_BOOT: "true" MIKRO_ORM_MIGRATIONS_DISABLE_FOREIGN_KEYS: "true"
MIKRO_ORM_MIGRATIONS_DISABLE_FOREIGN_KEYS: "true" ports:
ports: - "80:80"
- "80:80" depends_on:
depends_on: - postgres
- postgres networks:
networks: - sudo-flix-network
- sudo-flix-network networks:
sudo-flix-network:
networks: driver: bridge
sudo-flix-network:
driver: bridge
``` ```
**Important:**
* Replace `YourPasswordHere` with your secure database password.
* Generate a strong session secret and replace `32CharacterLongStringHere`.
</Steps.Step>
**Important:** <Steps.Step>
* Replace `YourPasswordHere` with your secure database password. **Start the Backend:** Open a terminal in the directory containing `docker-compose.yml` and execute:
* Generate a strong session secret and replace `32CharacterLongStringHere`.
2. **Start the Backend:** Open a terminal in the directory containing `docker-compose.yml` and execute:
```bash ```bash
docker-compose up -d docker-compose up -d
``` ```
</Steps.Step>
</Steps>
**Accessing Your Backend** ### Accessing Your Backend
Your backend should be accessible on `(YourPrivateIP):80`. To share it outside your local network, you'll need to configure port forwarding or cloudflared tunnel. Your backend should be accessible on `(YourPrivateIP):80`. To share it outside your local network, you'll need to configure port forwarding or cloudflared tunnel.
**Optional: Implementing a Reverse Proxy** ### Optional: Implementing a Reverse Proxy
To enhance your SSL and domain configuration, it's advisable to establish a reverse proxy, such as Nginx. For an optimal choice in this regard, Cloudflare Zero Trust Tunnel is recommended. You can find more information [here](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/). To enhance your SSL and domain configuration, it's advisable to establish a reverse proxy, such as Nginx. For an optimal choice in this regard, Cloudflare Zero Trust Tunnel is recommended. You can find more information [here](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/).
@ -86,12 +88,34 @@ Railway offers you $5 of credit once you verify your account, which is enough to
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/TS4mw5) [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/TS4mw5)
1. Login to your [Railway](https://railway.app) account if you have one, otherwise create one [here](https://railway.app/login). <Steps>
1. If you are signing up, then verify your account by clicking the link in the email Railway sends you. <Steps.Step>
1. If you created your account with an email, then to verify your account further, go to your account, then plans and verify your account with a GitHub account. Login to your [Railway](https://railway.app) account if you have one, otherwise create one [here](https://railway.app/login).
1. Click the [`Deploy on Railway`](https://railway.app/template/TS4mw5) button above. - If you are signing up, then verify your account by clicking the link in the email Railway sends you.
1. If a `Configure` button is displayed, click on it and allow Railway to access your GitHub account. - If you created your account with an email, then to verify your account further, go to your account, then plans and verify your account with a GitHub account.
1. Fill in the required variables or change the default values. </Steps.Step>
1. The `Deploy` button at the bottom of the template should be active, click on it.
1. Once the `Backend` service has deployed, copy the URL from the `Deployments` page. (Might take a second for it to be available after the service has deployed) <Steps.Step>
1. Congratulations! You have deployed the backend, you can now [set up the client](../self-hosting/use-backend.mdx). Click the [`Deploy on Railway`](https://railway.app/template/TS4mw5) button above.
</Steps.Step>
<Steps.Step>
If a `Configure` button is displayed, click on it and allow Railway to access your GitHub account.
</Steps.Step>
<Steps.Step>
Fill in the required variables or change the default values.
</Steps.Step>
<Steps.Step>
The `Deploy` button at the bottom of the template should be active, click on it.
</Steps.Step>
<Steps.Step>
Once the `Backend` service has deployed, copy the URL from the `Deployments` page. (Might take a second for it to be available after the service has deployed)
</Steps.Step>
<Steps.Step>
Congratulations! You have deployed the backend, you can now [set up the client](../self-hosting/use-backend.mdx).
</Steps.Step>
</Steps>

View file

@ -6,104 +6,184 @@ title: 'Deploy'
## Method 1 - Vercel - Recommended ## Method 1 - Vercel - Recommended
1. Click [here](https://github.com/sussy-code/smov/fork) to fork the sudo-flix Github repository <Steps>
1. Click [here](https://vercel.com/) to go to Vercel <Steps.Step>
1. Sign in using either a GitHub, GitLab, or Bitbucket. Click [here](https://github.com/sussy-code/smov/fork) to fork the sudo-flix Github repository
1. Clicking the "New Project" button on the top right of your dashboard and following the steps to create a new project for your self hosted version of movie web. </Steps.Step>
1. After clicking it, you'll be presented with a list of Git repositories that the Git account you've signed up with has write access to.
![image](https://github.com/sussy-code/docs/assets/115524074/f0186018-4499-4c29-9d04-f6c421811704) <Steps.Step>
1. Select your own fork of the sudo-flix Github repository. Click [here](https://vercel.com/) to go to Vercel
1. Configure the environment variables: </Steps.Step>
- `VITE_CORS_PROXY_URL`: Enter your proxy URL here. Make sure to not have a slash at the end of your URL. <Steps.Step>
Sign in using either a GitHub, GitLab, or Bitbucket.
Example (THIS IS AN EXAMPLE, IT WON'T WORK FOR YOU): `https://test-proxy.test.workers.dev` </Steps.Step>
- `VITE_TMDB_READ_API_KEY`: Enter your TMDB Read Access Token here. Please read [the TMDB page](./tmdb.mdx) on how to get an API key. <Steps.Step>
Clicking the "New Project" button on the top right of your dashboard and following the steps to create a new project for your self hosted version of movie web.
- `VITE_BACKEND_URL`: Only set if you have a self-hosted backend. Put in your backend URL. Check out [configuration reference](../client/configuration.mdx) for details. Make sure to not have a slash at the end of the URL. </Steps.Step>
![Screenshot 2024-04-07 at 14-55-24 New Project Vercel](https://github.com/sussy-code/docs/assets/115524074/a584ac1d-6e15-4618-8bb2-988985def3e0)
1. Click "Deploy" <Steps.Step>
1. Congrats! You have your own version of sudo-flix hosted. After clicking it, you'll be presented with a list of Git repositories that the Git account you've signed up with has write access to.
1. You may wish to configure a custom domain - Please consult [the Vercel docs for how to do this](https://vercel.com/docs/getting-started-with-vercel/domains). </Steps.Step>
<Steps.Step>
Select your own fork of the sudo-flix Github repository.
</Steps.Step>
<Steps.Step>
Configure the environment variables:
- `VITE_CORS_PROXY_URL`: Enter your proxy URL here. Make sure to not have a slash at the end of your URL.
Example (THIS IS AN EXAMPLE, IT WON'T WORK FOR YOU): `https://test-proxy.test.workers.dev`
- `VITE_TMDB_READ_API_KEY`: Enter your TMDB Read Access Token here. Please read [the TMDB page](./tmdb.mdx) on how to get an API key.
- `VITE_BACKEND_URL`: Only set if you have a self-hosted backend. Put in your backend URL. Check out [configuration reference](../client/configuration.mdx) for details. Make sure to not have a slash at the end of the URL.
</Steps.Step>
<Steps.Step>
Click "Deploy"
</Steps.Step>
<Steps.Step>
Congrats! You have your own version of sudo-flix hosted.
</Steps.Step>
<Steps.Step>
You may wish to configure a custom domain - Please consult [the Vercel docs for how to do this](https://vercel.com/docs/getting-started-with-vercel/domains).
</Steps.Step>
</Steps>
## Method 2 - Static Web Host ## Method 2 - Static Web Host
1. Download the file `sudo-flix.zip` from the latest release: https://github.com/sussy-code/smov/releases/latest. <Steps>
2. Extract the ZIP file so you can edit the files. <Steps.Step>
3. Open `config.js` in an editor such as Notepad, Visual Studio Code or similar. Download the file `sudo-flix.zip` from the latest release: https://github.com/sussy-code/smov/releases/latest.
4. Put your proxy URL in-between the double quotes of `VITE_CORS_PROXY_URL: ""`. Make sure to not have a slash at the end of your URL. </Steps.Step>
Example (THIS IS AN EXAMPLE, IT WON'T WORK FOR YOU): `VITE_CORS_PROXY_URL: "https://test-proxy.test.workers.dev"` <Steps.Step>
Extract the ZIP file so you can edit the files.
5. Put your TMDB Read Access Token inside the quotes of `VITE_TMDB_READ_API_KEY: ""`. Please read [the TMDB page](./tmdb.mdx) on how to get an API key. </Steps.Step>
6. If you have a self-hosted backend server, enter your URL in the `VITE_BACKEND_URL` variable. Check out [configuration reference](../client/configuration.mdx) for details. Make sure to not have a slash at the end of the URL.
7. Save the file. <Steps.Step>
8. Upload **all** of the files to a static website hosting such as: Open `config.js` in an editor such as Notepad, Visual Studio Code or similar.
- GitHub Pages </Steps.Step>
- Netlify
- Vercel <Steps.Step>
- Etc, [there are lots of options](https://www.staticwebsitehosting.org/). Put your proxy URL in-between the double quotes of `VITE_CORS_PROXY_URL: ""`. Make sure to not have a slash at the end of your URL.
9. Congrats! You have your own version of sudo-flix hosted. Example (THIS IS AN EXAMPLE, IT WON'T WORK FOR YOU): `VITE_CORS_PROXY_URL: "https://test-proxy.test.workers.dev"`
</Steps.Step>
<Steps.Step>
Put your TMDB Read Access Token inside the quotes of `VITE_TMDB_READ_API_KEY: ""`. Please read [the TMDB page](./tmdb.mdx) on how to get an API key.
</Steps.Step>
<Steps.Step>
If you have a self-hosted backend server, enter your URL in the `VITE_BACKEND_URL` variable. Check out [configuration reference](../client/configuration.mdx) for details. Make sure to not have a slash at the end of the URL.
</Steps.Step>
<Steps.Step>
Save the file.
</Steps.Step>
<Steps.Step>
Upload **all** of the files to a static website hosting such as:
- GitHub Pages
- Netlify
- Vercel
- Etc, [there are lots of options](https://www.staticwebsitehosting.org/).
</Steps.Step>
<Steps.Step>
Congrats! You have your own version of sudo-flix hosted.
</Steps.Step>
</Steps>
## Method 3 - Docker Compose - Home Network ## Method 3 - Docker Compose - Home Network
This method is meant for those using a desktop device or single board computer with a minimum of 4GB of RAM such as a [Raspberry Pi](https://www.raspberrypi.com/) to run sudo-flix on there home network for network connected devices. This method is meant for those using a desktop device or single board computer with a minimum of 4GB of RAM such as a [Raspberry Pi](https://www.raspberrypi.com/) to run sudo-flix on there home network for network connected devices.
1. Ensure you have [docker](https://docs.docker.com/get-docker/) installed. In a newly created directory called `sudo-flix` create a file called `docker-compose.yaml`. Paste the contents of the code block below into this file. <Steps>
<Steps.Step>
```yaml 1. Ensure you have [docker](https://docs.docker.com/get-docker/) installed. In a newly created directory called `sudo-flix` create a file called `docker-compose.yaml`. Paste the contents of the code block below into this file.
version: "3.8"
```yaml
services: version: "3.8"
movieweb: services:
build:
context: https://github.com/sussy-code/smov.git movieweb:
# args: build:
# TMDB_READ_API_KEY: "" context: https://github.com/sussy-code/smov.git
# CORS_PROXY_URL: "" # args:
# BACKEND_URL: "" # TMDB_READ_API_KEY: ""
ports: # CORS_PROXY_URL: ""
- "80:80" # BACKEND_URL: ""
restart: unless-stopped ports:
``` - "80:80"
restart: unless-stopped
2. Within the `docker-compose.yaml` file uncomment `args`, `TMDB_READ_API_KEY`, `CORS_PROXY_URL`. ```
- Make sure `args` is in-line with `context` </Steps.Step>
- Make sure `TMDB_READ_API_KEY` and `CORS_PROXY_URL` are tabbed once to the right of `args`.
3. Put your proxy URL in-between the double quotes of `CORS_PROXY_URL: ""`. Make sure to not have a slash at the end of your URL. <Steps.Step>
Within the `docker-compose.yaml` file uncomment `args`, `TMDB_READ_API_KEY`, `CORS_PROXY_URL`.
Example (THIS IS AN EXAMPLE, IT WON'T WORK FOR YOU): `CORS_PROXY_URL: "https://test-proxy.test.workers.dev"` - Make sure `args` is in-line with `context`
- Make sure `TMDB_READ_API_KEY` and `CORS_PROXY_URL` are tabbed once to the right of `args`.
4. Put your TMDB Read Access Token inside the quotes of `TMDB_READ_API_KEY: ""`. Please read [the TMDB page](./tmdb.mdx) on how to get an API key. </Steps.Step>
5. Uncomment and add any [additional environment variables](configuration.mdx) you may need. Remove the `VITE_` prefix when adding an environment variable to `args`.
6. Save the file! <Steps.Step>
7. Now use [docker](https://docs.docker.com/get-docker/) to run `movieweb` as background service. Put your proxy URL in-between the double quotes of `CORS_PROXY_URL: ""`. Make sure to not have a slash at the end of your URL.
```bash Example (THIS IS AN EXAMPLE, IT WON'T WORK FOR YOU): `CORS_PROXY_URL: "https://test-proxy.test.workers.dev"`
# sudo-flix is the current working directory </Steps.Step>
$ docker compose up --detach
``` <Steps.Step>
Put your TMDB Read Access Token inside the quotes of `TMDB_READ_API_KEY: ""`. Please read [the TMDB page](./tmdb.mdx) on how to get an API key.
8. Verify that setup was successful </Steps.Step>
- Navigate to `http://localhost`. You should see the UI for `sudo-flix`. Find something to watch and make sure that it plays.
- View logs with <Steps.Step>
Uncomment and add any [additional environment variables](configuration.mdx) you may need. Remove the `VITE_` prefix when adding an environment variable to `args`.
```bash </Steps.Step>
$ docker compose logs --follow movieweb
``` <Steps.Step>
Save the file!
9. Set a static IP address for your device. </Steps.Step>
- For Raspberry Pi: [guide](https://www.makeuseof.com/raspberry-pi-set-static-ip/)
- For Mac: [guide](https://www.macinstruct.com/tutorials/how-to-set-a-static-ip-address-on-a-mac/) <Steps.Step>
- For Windows: [guide](https://www.pcmag.com/how-to/how-to-set-up-a-static-ip-address) Now use [docker](https://docs.docker.com/get-docker/) to run `movieweb` as background service.
10. Navigate to movie web at `http://<static-ip-address` from another device connected to your network. ```bash
# sudo-flix is the current working directory
$ docker compose up --detach
```
</Steps.Step>
<Steps.Step>
Verify that setup was successful
- Navigate to `http://localhost`. You should see the UI for `sudo-flix`. Find something to watch and make sure that it plays.
- View logs with
```bash
$ docker compose logs --follow movieweb
```
</Steps.Step>
<Steps.Step>
Set a static IP address for your device.
- For Raspberry Pi: [guide](https://www.makeuseof.com/raspberry-pi-set-static-ip/)
- For Mac: [guide](https://www.macinstruct.com/tutorials/how-to-set-a-static-ip-address-on-a-mac/)
- For Windows: [guide](https://www.pcmag.com/how-to/how-to-set-up-a-static-ip-address)
</Steps.Step>
<Steps.Step>
Navigate to movie web at `http://<static-ip-address` from another device connected to your network.
</Steps.Step>
</Steps>
### To Perform Updates For New Releases of Movie Web ### To Perform Updates For New Releases of Movie Web
1. Make sure `sudo-flix` is your current working directory and run: Make sure `sudo-flix` is your current working directory and run:
```bash ```bash
# Re-build the image and start the container # Re-build the image and start the container

View file

@ -10,11 +10,29 @@ In order to search for movies and TV shows, we use an API called ["The Movie Dat
The API key is **free**, you just need to create an account. The API key is **free**, you just need to create an account.
</Note> </Note>
1. Create an account at https://www.themoviedb.org/signup <Steps>
1. You will be required to verify your email; click the link that you get sent to verify your account. <Steps.Step>
1. Go to https://www.themoviedb.org/settings/api/request to create a developer account. Create an account at https://www.themoviedb.org/signup
1. Read the terms and conditions and accept them. </Steps.Step>
1. Fill out your details:
- Select "Website" as type of use. <Steps.Step>
- For the other details can put any values; they are not important. You will be required to verify your email; click the link that you get sent to verify your account.
1. Copy the "API Read Access Token" - **DO NOT COPY THE API Key - IT WILL NOT WORK** </Steps.Step>
<Steps.Step>
Go to https://www.themoviedb.org/settings/api/request to create a developer account.
</Steps.Step>
<Steps.Step>
Read the terms and conditions and accept them.
</Steps.Step>
<Steps.Step>
Fill out your details:
- Select "Website" as type of use.
- For the other details can put any values; they are not important.
</Steps.Step>
<Steps.Step>
Copy the "API Read Access Token" - **DO NOT COPY THE API Key - IT WILL NOT WORK**
</Steps.Step>
</Steps>

View file

@ -8,38 +8,61 @@ The sudo-flix browser extension greatly enhances streaming quality and video ava
## Loading a CRX file ## Loading a CRX file
1. Download the crx file [here](https://github.com/sussy-code/browser-ext/releases/tag/1.1.4). <Steps>
<Steps.Step>
Download the crx file [here](https://github.com/sussy-code/browser-ext/releases/tag/1.1.4).
<Note>
Sometimes your browser may block downloading or installing CRX file from outside the Chrome Web Store. If so, download the ZIP file instead.
</Note>
</Steps.Step>
<Note> <Steps.Step>
Sometimes your browser may block downloading or installing CRX file from outside the Chrome Web Store. If so, download the ZIP file instead. Go to your extensions page by typing the corresponding URL into your browser from the table below.
</Note>
| Browser | URL |
| :--------------- | :-------------------- |
| Microsoft Edge | `edge://extensions` |
| Google Chrome | `chrome://extensions` |
| Mozilla Firefox | `about:addons` |
</Steps.Step>
2. Go to your extensions page by typing the corresponding URL into your browser from the table below. <Steps.Step>
Enable `Developer mode`, watch [this video](https://www.youtube.com/watch?v=sZeUZjhOfgM&t=65s) if you have trouble.
</Steps.Step>
| Browser | URL | <Steps.Step>
| :--------------- | :-------------------- | Drag and drop the downloaded extension CRX file into the Extensions page.
| Microsoft Edge | `edge://extensions` | </Steps.Step>
| Google Chrome | `chrome://extensions` |
| Mozilla Firefox | `about:addons` |
3. Enable `Developer mode`, watch [this video](https://www.youtube.com/watch?v=sZeUZjhOfgM&t=65s) if you have trouble. <Steps.Step>
When prompted, click Add extension to install the extension.
4. Drag and drop the downloaded extension CRX file into the Extensions page. </Steps.Step>
</Steps>
5. When prompted, click Add extension to install the extension.
## Loading a ZIP file ## Loading a ZIP file
1. Download and unpack the ZIP file from [here](https://github.com/sussy-code/browser-ext/releases/tag/1.1.4). <Steps>
<Steps.Step>
Download and unpack the ZIP file from [here](https://github.com/sussy-code/browser-ext/releases/tag/1.1.4).
</Steps.Step>
2. Head to your browser's extensions page (see table above). <Steps.Step>
Head to your browser's extensions page (see table above).
</Steps.Step>
3. Enable `Developer mode` toggle. <Steps.Step>
Enable `Developer mode` toggle.
</Steps.Step>
4. Click the `Load unpacked` button. <Steps.Step>
Click the `Load unpacked` button.
</Steps.Step>
5. Select the folder with the unpacked extension ZIP file from step 1. <Steps.Step>
Select the folder with the unpacked extension ZIP file from step 1.
</Steps.Step>
</Steps>
<Note> <Note>
To enable the extension for a website, just click the prominent "On" button displayed when clicking the extension. To enable the extension for a website, just click the prominent "On" button displayed when clicking the extension.
</Note> </Note>

View file

@ -1,79 +1,83 @@
### Guide to full Self-Deployment of sudo-flix with Docker Compose # Guide to Self-Deployment with Docker Compose
1. **Install Docker and Docker Compose:** <Steps>
<Steps.Step>
**Install Docker and Docker Compose:**
Ensure that Docker and Docker Compose are installed on your system. You can follow the official Docker documentation for installation instructions: Ensure that Docker and Docker Compose are installed on your system. You can follow the official Docker documentation for installation instructions:
- [Install Docker](https://docs.docker.com/get-docker/) - [Install Docker](https://docs.docker.com/get-docker/)
</Steps.Step>
2. **Create a Docker Compose file:** <Steps.Step>
**Create a Docker Compose file:**
Create a new file named `docker-compose.yml` in your project directory and paste the following content into it: Create a new file named `docker-compose.yml` in your project directory and paste the following content into it:
```yaml ```yaml
version: '3.8' version: '3.8'
services:
postgres:
image: postgres
restart: unless-stopped
environment:
POSTGRES_USER: movie_web_user
POSTGRES_DB: movie_web_backend
POSTGRES_PASSWORD: YourPasswordHere
networks:
- sudo-flix-network
services: sudo-flix-backend:
postgres: image: ghcr.io/sudo-flix/backend:latest
image: postgres restart: unless-stopped
restart: unless-stopped environment:
environment: MWB_SERVER__CORS: "https://movie-backend.example.tld https://movie.example.tld"
POSTGRES_USER: movie_web_user MWB_SERVER__PORT: 8080
POSTGRES_DB: movie_web_backend MWB_POSTGRES__CONNECTION: postgresql://movie_web_user:YourPasswordHere@postgres:5432/movie_web_backend
POSTGRES_PASSWORD: YourPasswordHere MWB_CRYPTO__SESSION_SECRET: 32CHARACTERLONGSECRET
networks: MWB_META__NAME: Server name
- sudo-flix-network MWB_META__DESCRIPTION: Server Description
MWB_POSTGRES__MIGRATE_ON_BOOT: "true"
MWB_SERVER__TRUSTPROXY: "true"
MWB_SERVER__TRUSTCLOUDFLARE: "true"
# This is needed to resolve errors running migrations on some platforms - does not affect the application
MIKRO_ORM_MIGRATIONS_DISABLE_FOREIGN_KEYS: "false"
ports:
- "8080:8080"
depends_on:
- postgres
networks:
- sudo-flix-network
sudo-flix-backend: sudo-flix-frontend:
image: ghcr.io/sudo-flix/backend:latest build:
restart: unless-stopped context: https://github.com/sussy-code/smov.git
environment: args:
MWB_SERVER__CORS: "https://movie-backend.example.tld https://movie.example.tld" TMDB_READ_API_KEY: "YourTMDBReadAPIKeyHere"
MWB_SERVER__PORT: 8080 CORS_PROXY_URL: "https://cors.example.tld https://second.cors.example.tld"
MWB_POSTGRES__CONNECTION: postgresql://movie_web_user:YourPasswordHere@postgres:5432/movie_web_backend BACKEND_URL: "https://backend.example.tld"
MWB_CRYPTO__SESSION_SECRET: 32CHARACTERLONGSECRET DMCA_EMAIL: "YourEmail"
MWB_META__NAME: Server name PWA_ENABLED: "true"
MWB_META__DESCRIPTION: Server Description APP_DOMAIN: "YourDomainHere"
MWB_POSTGRES__MIGRATE_ON_BOOT: "true" OPENSEARCH_ENABLED: "true"
MWB_SERVER__TRUSTPROXY: "true" GA_ID: "Google ID Here"
MWB_SERVER__TRUSTCLOUDFLARE: "true" ports:
# This is needed to resolve errors running migrations on some platforms - does not affect the application - "80:80"
MIKRO_ORM_MIGRATIONS_DISABLE_FOREIGN_KEYS: "false" networks:
ports: - sudo-flix-network
- "8080:8080" restart: unless-stopped
depends_on:
- postgres
networks:
- sudo-flix-network
sudo-flix-frontend: sudo-flix-proxy:
build: image: ghcr.io/sudo-flix/simple-proxy:latest
context: https://github.com/sussy-code/smov.git ports:
args: - "3000:3000"
TMDB_READ_API_KEY: "YourTMDBReadAPIKeyHere" networks:
CORS_PROXY_URL: "https://cors.example.tld https://second.cors.example.tld" - sudo-flix-network
BACKEND_URL: "https://backend.example.tld" restart: unless-stopped
DMCA_EMAIL: "YourEmail"
PWA_ENABLED: "true"
APP_DOMAIN: "YourDomainHere"
OPENSEARCH_ENABLED: "true"
GA_ID: "Google ID Here"
ports:
- "80:80"
networks:
- sudo-flix-network
restart: unless-stopped
sudo-flix-proxy: networks:
image: ghcr.io/sudo-flix/simple-proxy:latest sudo-flix-network:
ports: driver: bridge
- "3000:3000"
networks:
- sudo-flix-network
restart: unless-stopped
networks:
sudo-flix-network:
driver: bridge
``` ```
**Important:** **Important:**
* Replace `YourPasswordHere` with your secure database password. * Replace `YourPasswordHere` with your secure database password.
@ -81,15 +85,20 @@
* Replace `TMDBReadAPIKey` with your api key learn more [here](../client/tmdb.mdx). * Replace `TMDBReadAPIKey` with your api key learn more [here](../client/tmdb.mdx).
* replace `yourDomainHere` with whatever you'll be using to access your main site, like sudo-flix.app * replace `yourDomainHere` with whatever you'll be using to access your main site, like sudo-flix.app
* replace `meta__name` and `meta__description` * replace `meta__name` and `meta__description`
2. **Start the Backend:** Open a terminal in the directory containing `docker-compose.yml` and execute: </Steps.Step>
<Steps.Step>
**Start the Backend:** Open a terminal in the directory containing `docker-compose.yml` and execute:
```bash ```bash
docker compose up --detach docker compose up --detach
``` ```
**Accessing Your Backend** </Steps.Step>
</Steps>
### Accessing Your Backend
Your services should be accessible on `(YourPrivateIP):port`. To share it outside your local network, you'll need to configure port forwarding or cloudflared tunnel. Your services should be accessible on `(YourPrivateIP):port`. To share it outside your local network, you'll need to configure port forwarding or cloudflared tunnel.
**Optional: Implementing a Reverse Proxy** ### Optional: Implementing a Reverse Proxy
To enhance your SSL and domain configuration, it's advisable to establish a reverse proxy, such as Nginx. For an optimal choice in this regard, Cloudflare Zero Trust Tunnel is recommended. You can find more information [here](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/). To enhance your SSL and domain configuration, it's advisable to establish a reverse proxy, such as Nginx. For an optimal choice in this regard, Cloudflare Zero Trust Tunnel is recommended. You can find more information [here](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/).

View file

@ -23,12 +23,28 @@ This method is recommended if you want to host a proxy for your friends and or f
{/* This method is recommended if you want to host a proxy for your friends and family to use, or if you want to use sudo-flix on a device that doesn't support the [browser extension](#method-1---browser-extension), such as a smart TV or mobile device.*/} {/* This method is recommended if you want to host a proxy for your friends and family to use, or if you want to use sudo-flix on a device that doesn't support the [browser extension](#method-1---browser-extension), such as a smart TV or mobile device.*/}
1. Set up a proxy using one of our [guides](../proxy/deploy.mdx), [though we recommend Netlify](../proxy/deploy.mdx#method-1-netlify-easy). <Steps>
2. Once that's done, go to the **Connections** section of the **Settings page** on your sudo-flix instance of choice. <Steps.Step>
3. Enable `Use custom proxy workers` if it's not already enabled. Set up a proxy using one of our [guides](../proxy/deploy.mdx), [though we recommend Netlify](../proxy/deploy.mdx#method-1-netlify-easy).
4. Add a new custom proxy by clicking `Add new worker`. </Steps.Step>
5. Copy the URL of the proxy you deployed before, and paste it into the empty text box.
![Example of settings page](/assets/proxy-url-example.gif) <Steps.Step>
Once that's done, go to the **Connections** section of the **Settings page** on your sudo-flix instance of choice.
</Steps.Step>
<Steps.Step>
Enable `Use custom proxy workers` if it's not already enabled.
</Steps.Step>
<Steps.Step>
Add a new custom proxy by clicking `Add new worker`.
</Steps.Step>
<Steps.Step>
Copy the URL of the proxy you deployed before, and paste it into the empty text box.
![Example of settings page](/assets/proxy-url-example.gif)
</Steps.Step>
</Steps>
<Note> <Note>
If you're self-hosting the client, you can use the [`VITE_CORS_PROXY_URL`](../client/configuration.mdx#vite-cors-proxy-url) variable to set the proxy URL for everyone who uses your client. If you're self-hosting the client, you can use the [`VITE_CORS_PROXY_URL`](../client/configuration.mdx#vite-cors-proxy-url) variable to set the proxy URL for everyone who uses your client.

View file

@ -10,13 +10,32 @@ Netlify has a very generous free plan, so you'll be able to host your proxy for
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/sussy-code/simple-proxy) [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/sussy-code/simple-proxy)
1. Create a GitHub account at https://github.com/signup if you don't have one already. <Steps>
1. Click on the `Deploy to Netlify` button above. <Steps.Step>
1. Authorize Netlify to connect with GitHub by clicking the `Connect to GitHub` button. Create a GitHub account at https://github.com/signup if you don't have one already.
1. There should now be a `Save & Deploy` button, click it. </Steps.Step>
1. Once the deployment is complete, click on the `Get Started` button that pops up, this will redirect you to the dashboard of your site.
1. Click on the only site in the `Sites` section of your dashboard. <Steps.Step>
1. Find the link of your site near the top of the page, it should look something like `https://<random-words>.netlify.app`. Right click the link, click `Copy link address`. [Now you'll just have to set up the client](../extra/streaming.mdx#method-1-self-hosted-proxy)! Click on the `Deploy to Netlify` button above.
- Authorize Netlify to connect with GitHub by clicking the `Connect to GitHub` button.
</Steps.Step>
<Steps.Step>
There should now be a `Save & Deploy` button, click it.
</Steps.Step>
<Steps.Step>
Once the deployment is complete, click on the `Get Started` button that pops up, this will redirect you to the dashboard of your site.
</Steps.Step>
<Steps.Step>
Click on the only site in the `Sites` section of your dashboard.
</Steps.Step>
<Steps.Step>
Find the link of your site near the top of the page, it should look something like `https://<random-words>.netlify.app`. Right click the link, click `Copy link address`. [Now you'll just have to set up the client](../extra/streaming.mdx#method-1-self-hosted-proxy)!
</Steps.Step>
</Steps>
## Method 2 - Cloudflare (Easy) ## Method 2 - Cloudflare (Easy)
@ -28,29 +47,69 @@ Cloudflare has a generous free plan, so you don't need to pay anything unless yo
[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/sussy-code/simple-proxy) [![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/sussy-code/simple-proxy)
1. Create a GitHub account at https://github.com if you don't have one. <Steps>
1. Click the `Deploy with workers` button above. <Steps.Step>
1. Click the `Authorize Workers` button to authorize Cloudflare to talk to GitHub. Create a GitHub account at https://github.com if you don't have one.
1. Authorize Cloudflare Workers in the GitHub page that pops up. </Steps.Step>
1. Follow the instructions to configure your Cloudflare account. Select `I have an account` if you have a Cloudflare account already, otherwise follow the link to create one.
1. Click the link to [`Workers Dashboard`](https://dash.cloudflare.com/sign-up?to=/:account/workers-and-pages) to find your account ID. <Steps.Step>
1. You can copy your account ID from the URL e.g. https://dash.cloudflare.com/ab7cb454c93987b6343350d4e84c16c7/workers-and-pages/create where `ab7cb454c93987b6343350d4e84c16c7` is the account ID. Click the `Deploy with workers` button above.
1. Paste the account ID into the text box on the original Cloudflare workers page. </Steps.Step>
1. Click the link to [`My Profile`](https://dash.cloudflare.com/profile/api-tokens), to create an API token.
1. Click `Create Token`. <Steps.Step>
1. Select `Use template` next to `Edit Cloudflare Workers`. Click the `Authorize Workers` button to authorize Cloudflare to talk to GitHub.
1. Under `Account Resources`, select `Include` and your account under the dropdown. </Steps.Step>
1. Under `Zone Resources`, select `All zones` (You can select a more specific zone if you have the zones available).
1. At the bottom of the page, click `Continue to summary`. <Steps.Step>
1. On the next screen, click `Create token`. Authorize Cloudflare Workers in the GitHub page that pops up.
1. Copy the API token and **save it in a safe place, it won't be shown again**. </Steps.Step>
1. Paste the API token into the Cloudflare Workers API Token text box.
1. Click `Fork the Repository` and follow the instructions to enable workflows. <Steps.Step>
1. Click `Deploy` to deploy to Cloudflare Workers. Follow the instructions to configure your Cloudflare account. Select `I have an account` if you have a Cloudflare account already, otherwise follow the link to create one.
1. Congratulations! Your worker is now deploying. Please wait for the GitHub Action to build and publish your worker. </Steps.Step>
1. You can click the [`Worker dash`](https://dash.cloudflare.com/sign-up?to=/:account/workers-and-pages) and `GitHub repo` buttons to see the status of the deploy.
1. When the worker has deployed, you will need to take note of the URL. This can be found on Cloudflare under [Workers and Pages -> Overview](https://dash.cloudflare.com/sign-up?to=/:account/workers-and-pages) -> Proxy. <Steps.Step>
1. Use the URL you took note of and [set up a custom proxy in the client](../extra/streaming.mdx#method-1-self-hosted-proxy). Click the link to [`Workers Dashboard`](https://dash.cloudflare.com/sign-up?to=/:account/workers-and-pages) to find your account ID.
- You can copy your account ID from the URL e.g. https://dash.cloudflare.com/ab7cb454c93987b6343350d4e84c16c7/workers-and-pages/create where `ab7cb454c93987b6343350d4e84c16c7` is the account ID.
- Paste the account ID into the text box on the original Cloudflare workers page.
</Steps.Step>
<Steps.Step>
Click the link to [`My Profile`](https://dash.cloudflare.com/profile/api-tokens), to create an API token.
- Click `Create Token`.
- Select `Use template` next to `Edit Cloudflare Workers`.
- Under `Account Resources`, select `Include` and your account under the dropdown.
- Under `Zone Resources`, select `All zones` (You can select a more specific zone if you have the zones available).
- At the bottom of the page, click `Continue to summary`.
- On the next screen, click `Create token`.
- Copy the API token and **save it in a safe place, it won't be shown again**.
- Paste the API token into the Cloudflare Workers API Token text box.
</Steps.Step>
<Steps.Step>
Click `Fork the Repository` and follow the instructions to enable workflows.
</Steps.Step>
<Steps.Step>
Click `Deploy` to deploy to Cloudflare Workers.
</Steps.Step>
<Steps.Step>
Congratulations! Your worker is now deploying. Please wait for the GitHub Action to build and publish your worker.
</Steps.Step>
<Steps.Step>
You can click the [`Worker dash`](https://dash.cloudflare.com/sign-up?to=/:account/workers-and-pages) and `GitHub repo` buttons to see the status of the deploy.
</Steps.Step>
<Steps.Step>
When the worker has deployed, you will need to take note of the URL. This can be found on Cloudflare under [Workers and Pages -> Overview](https://dash.cloudflare.com/sign-up?to=/:account/workers-and-pages) -> Proxy.
</Steps.Step>
<Steps.Step>
Use the URL you took note of and [set up a custom proxy in the client](../extra/streaming.mdx#method-1-self-hosted-proxy).
</Steps.Step>
</Steps>
## Method 2 - Cloudflare (Manual) ## Method 2 - Cloudflare (Manual)
@ -58,22 +117,53 @@ Cloudflare has a generous free plan, so you don't need to pay anything unless yo
The sources showbox and febbox do NOT work with cloudflare. Use a different host if you want those to work. The sources showbox and febbox do NOT work with cloudflare. Use a different host if you want those to work.
</Warning> </Warning>
1. Login to your Cloudflare account if you have one, otherwise create one [here](https://dash.cloudflare.com/sign-up?to=/:account/workers-and-pages) <Steps>
1. If you are signing up for an account, make sure to verify your email before going further! <Steps.Step>
1. Download the latest version of the Cloudflare [`simple-proxy-cloudflare.mjs` script from here](https://github.com/sussy-code/simple-proxy/releases/latest/download/simple-proxy-cloudflare.mjs). Login to your Cloudflare account if you have one, otherwise create one [here](https://dash.cloudflare.com/sign-up?to=/:account/workers-and-pages)
1. Go to `Workers & Pages` and then `Overview` in the left-hand navigation bar. - If you are signing up for an account, make sure to verify your email before going further!
1. Click the `Create Worker` button </Steps.Step>
1. If you've made a worker or pages application before, you will need to click `Create Application` first
1. Give your worker a name and click `Deploy`. This can be anything you would like! <Steps.Step>
1. On the `Congratulations` web page, click the `Edit code` button to edit the code in the worker you have just created. Download the latest version of the Cloudflare [`simple-proxy-cloudflare.mjs` script from here](https://github.com/sussy-code/simple-proxy/releases/latest/download/simple-proxy-cloudflare.mjs).
1. There should now be a code editor on the left hand side on the web page. </Steps.Step>
1. Select all of the existing template code and delete it. **You must make sure all of the code is deleted for this to work!**
1. Go to your downloads folder and open up the `simple-proxy-cloudflare.mjs` file you downloaded earlier in a text editor, and **copy** the contents. <Steps.Step>
1. Back in your browser, paste the contents of the file into the code editor. Go to `Workers & Pages` and then `Overview` in the left-hand navigation bar.
1. The `Save and deploy` button in the top right corner should now be active, click it to deploy your proxy! </Steps.Step>
1. A confirmation dialog will appear, click `Save and deploy` once more.
1. Your worker is now deployed! You can click the back button in the top left to take you back to the summary screen. <Steps.Step>
1. On the summary screen, your worker link will be displayed under `Preview`. Right click the link, click `Copy link address` and save the link somewhere - [you will need it to set up the client](../5.extra/1.streaming.md#method-1---self-hosted-proxy)! Click the `Create Worker` button
- If you've made a worker or pages application before, you will need to click `Create Application` first
- Give your worker a name and click `Deploy`. This can be anything you would like!
</Steps.Step>
<Steps.Step>
On the `Congratulations` web page, click the `Edit code` button to edit the code in the worker you have just created.
</Steps.Step>
<Steps.Step>
There should now be a code editor on the left hand side on the web page.
- Select all of the existing template code and delete it. **You must make sure all of the code is deleted for this to work!**
- Go to your downloads folder and open up the `simple-proxy-cloudflare.mjs` file you downloaded earlier in a text editor, and **copy** the contents.
- Back in your browser, paste the contents of the file into the code editor.
</Steps.Step>
<Steps.Step>
The `Save and deploy` button in the top right corner should now be active, click it to deploy your proxy!
</Steps.Step>
<Steps.Step>
A confirmation dialog will appear, click `Save and deploy` once more.
</Steps.Step>
<Steps.Step>
Your worker is now deployed! You can click the back button in the top left to take you back to the summary screen.
</Steps.Step>
<Steps.Step>
On the summary screen, your worker link will be displayed under `Preview`. Right click the link, click `Copy link address` and save the link somewhere - [you will need it to set up the client](../5.extra/1.streaming.md#method-1---self-hosted-proxy)!
</Steps.Step>
</Steps>
## Method 3 - Railway (Easy) ## Method 3 - Railway (Easy)
@ -81,14 +171,33 @@ Railway offers you $5 of credit once you verify your account, which is enough to
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/dyYHq1) [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/dyYHq1)
1. Login to your [Railway](https://railway.app) account if you have one, otherwise create one [here](https://railway.app/login). <Steps>
1. If you are signing up, then verify your account by clicking the link in the email Railway sends you. <Steps.Step>
1. If you created your account with an email, then to verify your account further, go to your account, then plans and verify your account with a GitHub account. Login to your [Railway](https://railway.app) account if you have one, otherwise create one [here](https://railway.app/login).
1. Click the [`Deploy on Railway`](https://railway.app/template/dyYHq1) button above. - If you are signing up, then verify your account by clicking the link in the email Railway sends you.
1. If a `Configure` button is displayed, click on it and allow Railway to access your GitHub account. - If you created your account with an email, then to verify your account further, go to your account, then plans and verify your account with a GitHub account.
1. The `Deploy` button at the bottom of the template should be active, click on it. </Steps.Step>
1. Once the proxy has deployed, copy the URL from the `Deployments` page.
1. Congratulations! You have deployed the proxy, [you can now set up the client](../extra/streaming.mdx#method-1-self-hosted-proxy). <Steps.Step>
Click the [`Deploy on Railway`](https://railway.app/template/dyYHq1) button above.
</Steps.Step>
<Steps.Step>
If a `Configure` button is displayed, click on it and allow Railway to access your GitHub account.
</Steps.Step>
<Steps.Step>
The `Deploy` button at the bottom of the template should be active, click on it.
</Steps.Step>
<Steps.Step>
Once the proxy has deployed, copy the URL from the `Deployments` page.
</Steps.Step>
<Steps.Step>
Congratulations! You have deployed the proxy, [you can now set up the client](../extra/streaming.mdx#method-1-self-hosted-proxy).
</Steps.Step>
</Steps>
## Method 4 - Docker ## Method 4 - Docker

View file

@ -10,7 +10,20 @@ If you would like to use an alternative backend server (the server responsible f
Changing your backend server will log you out of your account - make sure you have a copy of your 12-word passphrase saved in case you need to go back! Changing your backend server will log you out of your account - make sure you have a copy of your 12-word passphrase saved in case you need to go back!
</Caution> </Caution>
1. On sudo-flix, click the menu icon at the top right and then `Settings`. <Steps>
1. Scroll down the page to the `Connections` section. <Steps.Step>
1. Enable the `Custom server` toggle and enter your backend URL in the input box that appears. On sudo-flix, click the menu icon at the top right and then `Settings`.
1. Click `Save` at the bottom right corner of your screen. </Steps.Step>
<Steps.Step>
Scroll down the page to the `Connections` section.
</Steps.Step>
<Steps.Step>
Enable the `Custom server` toggle and enter your backend URL in the input box that appears.
</Steps.Step>
<Steps.Step>
Click `Save` at the bottom right corner of your screen.
</Steps.Step>
</Steps>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 KiB

After

Width:  |  Height:  |  Size: 369 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 35 KiB