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
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/)
**Setup**
1. **Create `docker-compose.yml`:**
```yaml
version: '3.8'
services:
postgres:
image: postgres
environment:
POSTGRES_USER: movie_web_user
POSTGRES_DB: movie_web_backend
POSTGRES_PASSWORD: YourPasswordHere
ports:
- "5432:5432"
networks:
- sudo-flix-network
sudo-flix:
image: ghcr.io/sudo-flix/backend:latest
environment:
MWB_POSTGRES__CONNECTION: postgresql://movie_web_user:YourPasswordHere@postgres:5432/movie_web_backend
MWB_CRYPTO__SESSION_SECRET: 32CharacterLongStringHere
MWB_META__NAME: unofficial-sudo-flix
MWB_POSTGRES__MIGRATE_ON_BOOT: "true"
MIKRO_ORM_MIGRATIONS_DISABLE_FOREIGN_KEYS: "true"
ports:
- "80:80"
depends_on:
- postgres
networks:
- sudo-flix-network
networks:
sudo-flix-network:
driver: bridge
<Steps>
<Steps.Step>
**Create `docker-compose.yml`:**
```yaml
version: '3.8'
services:
postgres:
image: postgres
environment:
POSTGRES_USER: movie_web_user
POSTGRES_DB: movie_web_backend
POSTGRES_PASSWORD: YourPasswordHere
ports:
- "5432:5432"
networks:
- sudo-flix-network
sudo-flix:
image: ghcr.io/sudo-flix/backend:latest
environment:
MWB_POSTGRES__CONNECTION: postgresql://movie_web_user:YourPasswordHere@postgres:5432/movie_web_backend
MWB_CRYPTO__SESSION_SECRET: 32CharacterLongStringHere
MWB_META__NAME: unofficial-sudo-flix
MWB_POSTGRES__MIGRATE_ON_BOOT: "true"
MIKRO_ORM_MIGRATIONS_DISABLE_FOREIGN_KEYS: "true"
ports:
- "80:80"
depends_on:
- postgres
networks:
- sudo-flix-network
networks:
sudo-flix-network:
driver: bridge
```
**Important:**
* Replace `YourPasswordHere` with your secure database password.
* Generate a strong session secret and replace `32CharacterLongStringHere`.
</Steps.Step>
**Important:**
* Replace `YourPasswordHere` with your secure database password.
* Generate a strong session secret and replace `32CharacterLongStringHere`.
2. **Start the Backend:** Open a terminal in the directory containing `docker-compose.yml` and execute:
<Steps.Step>
**Start the Backend:** Open a terminal in the directory containing `docker-compose.yml` and execute:
```bash
docker-compose up -d
```
```bash
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.
**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/).
@ -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)
1. Login to your [Railway](https://railway.app) account if you have one, otherwise create one [here](https://railway.app/login).
1. If you are signing up, then verify your account by clicking the link in the email Railway sends you.
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.
1. Click the [`Deploy on Railway`](https://railway.app/template/TS4mw5) button above.
1. If a `Configure` button is displayed, click on it and allow Railway to access your GitHub account.
1. Fill in the required variables or change the default values.
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)
1. Congratulations! You have deployed the backend, you can now [set up the client](../self-hosting/use-backend.mdx).
<Steps>
<Steps.Step>
Login to your [Railway](https://railway.app) account if you have one, otherwise create one [here](https://railway.app/login).
- If you are signing up, then verify your account by clicking the link in the email Railway sends you.
- 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.
</Steps.Step>
<Steps.Step>
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
1. Click [here](https://github.com/sussy-code/smov/fork) to fork the sudo-flix Github repository
1. Click [here](https://vercel.com/) to go to Vercel
1. Sign in using either a GitHub, GitLab, or Bitbucket.
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.
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)
1. Select your own fork of the sudo-flix Github repository.
1. 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.
![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"
1. Congrats! You have your own version of sudo-flix hosted.
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>
<Steps.Step>
Click [here](https://github.com/sussy-code/smov/fork) to fork the sudo-flix Github repository
</Steps.Step>
<Steps.Step>
Click [here](https://vercel.com/) to go to Vercel
</Steps.Step>
<Steps.Step>
Sign in using either a GitHub, GitLab, or Bitbucket.
</Steps.Step>
<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.
</Steps.Step>
<Steps.Step>
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.
</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
1. Download the file `sudo-flix.zip` from the latest release: https://github.com/sussy-code/smov/releases/latest.
2. Extract the ZIP file so you can edit the files.
3. Open `config.js` in an editor such as Notepad, Visual Studio Code or similar.
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.
Example (THIS IS AN EXAMPLE, IT WON'T WORK FOR YOU): `VITE_CORS_PROXY_URL: "https://test-proxy.test.workers.dev"`
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.
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.
8. 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/).
9. Congrats! You have your own version of sudo-flix hosted.
<Steps>
<Steps.Step>
Download the file `sudo-flix.zip` from the latest release: https://github.com/sussy-code/smov/releases/latest.
</Steps.Step>
<Steps.Step>
Extract the ZIP file so you can edit the files.
</Steps.Step>
<Steps.Step>
Open `config.js` in an editor such as Notepad, Visual Studio Code or similar.
</Steps.Step>
<Steps.Step>
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.
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
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.
```yaml
version: "3.8"
services:
movieweb:
build:
context: https://github.com/sussy-code/smov.git
# args:
# TMDB_READ_API_KEY: ""
# CORS_PROXY_URL: ""
# BACKEND_URL: ""
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`
- 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.
Example (THIS IS AN EXAMPLE, IT WON'T WORK FOR YOU): `CORS_PROXY_URL: "https://test-proxy.test.workers.dev"`
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.
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!
7. Now use [docker](https://docs.docker.com/get-docker/) to run `movieweb` as background service.
```bash
# sudo-flix is the current working directory
$ docker compose up --detach
```
8. 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
```
9. 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)
10. Navigate to movie web at `http://<static-ip-address` from another device connected to your network.
<Steps>
<Steps.Step>
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.
```yaml
version: "3.8"
services:
movieweb:
build:
context: https://github.com/sussy-code/smov.git
# args:
# TMDB_READ_API_KEY: ""
# CORS_PROXY_URL: ""
# BACKEND_URL: ""
ports:
- "80:80"
restart: unless-stopped
```
</Steps.Step>
<Steps.Step>
Within the `docker-compose.yaml` file uncomment `args`, `TMDB_READ_API_KEY`, `CORS_PROXY_URL`.
- 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`.
</Steps.Step>
<Steps.Step>
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.
Example (THIS IS AN EXAMPLE, IT WON'T WORK FOR YOU): `CORS_PROXY_URL: "https://test-proxy.test.workers.dev"`
</Steps.Step>
<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.
</Steps.Step>
<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`.
</Steps.Step>
<Steps.Step>
Save the file!
</Steps.Step>
<Steps.Step>
Now use [docker](https://docs.docker.com/get-docker/) to run `movieweb` as background service.
```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
1. Make sure `sudo-flix` is your current working directory and run:
Make sure `sudo-flix` is your current working directory and run:
```bash
# 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.
</Note>
1. Create an account at https://www.themoviedb.org/signup
1. You will be required to verify your email; click the link that you get sent to verify your account.
1. Go to https://www.themoviedb.org/settings/api/request to create a developer account.
1. Read the terms and conditions and accept them.
1. Fill out your details:
- Select "Website" as type of use.
- For the other details can put any values; they are not important.
1. Copy the "API Read Access Token" - **DO NOT COPY THE API Key - IT WILL NOT WORK**
<Steps>
<Steps.Step>
Create an account at https://www.themoviedb.org/signup
</Steps.Step>
<Steps.Step>
You will be required to verify your email; click the link that you get sent to verify your account.
</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
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>
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>
Go to your extensions page by typing the corresponding URL into your browser from the table below.
| 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 |
| :--------------- | :-------------------- |
| Microsoft Edge | `edge://extensions` |
| Google Chrome | `chrome://extensions` |
| Mozilla Firefox | `about:addons` |
<Steps.Step>
Drag and drop the downloaded extension CRX file into the Extensions page.
</Steps.Step>
3. Enable `Developer mode`, watch [this video](https://www.youtube.com/watch?v=sZeUZjhOfgM&t=65s) if you have trouble.
4. Drag and drop the downloaded extension CRX file into the Extensions page.
5. When prompted, click Add extension to install the extension.
<Steps.Step>
When prompted, click Add extension to install the extension.
</Steps.Step>
</Steps>
## 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>
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:
- [Install Docker](https://docs.docker.com/get-docker/)
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/)
</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
version: '3.8'
```yaml
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:
postgres:
image: postgres
restart: unless-stopped
environment:
POSTGRES_USER: movie_web_user
POSTGRES_DB: movie_web_backend
POSTGRES_PASSWORD: YourPasswordHere
networks:
- sudo-flix-network
sudo-flix-backend:
image: ghcr.io/sudo-flix/backend:latest
restart: unless-stopped
environment:
MWB_SERVER__CORS: "https://movie-backend.example.tld https://movie.example.tld"
MWB_SERVER__PORT: 8080
MWB_POSTGRES__CONNECTION: postgresql://movie_web_user:YourPasswordHere@postgres:5432/movie_web_backend
MWB_CRYPTO__SESSION_SECRET: 32CHARACTERLONGSECRET
MWB_META__NAME: Server name
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:
image: ghcr.io/sudo-flix/backend:latest
restart: unless-stopped
environment:
MWB_SERVER__CORS: "https://movie-backend.example.tld https://movie.example.tld"
MWB_SERVER__PORT: 8080
MWB_POSTGRES__CONNECTION: postgresql://movie_web_user:YourPasswordHere@postgres:5432/movie_web_backend
MWB_CRYPTO__SESSION_SECRET: 32CHARACTERLONGSECRET
MWB_META__NAME: Server name
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-frontend:
build:
context: https://github.com/sussy-code/smov.git
args:
TMDB_READ_API_KEY: "YourTMDBReadAPIKeyHere"
CORS_PROXY_URL: "https://cors.example.tld https://second.cors.example.tld"
BACKEND_URL: "https://backend.example.tld"
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-frontend:
build:
context: https://github.com/sussy-code/smov.git
args:
TMDB_READ_API_KEY: "YourTMDBReadAPIKeyHere"
CORS_PROXY_URL: "https://cors.example.tld https://second.cors.example.tld"
BACKEND_URL: "https://backend.example.tld"
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:
image: ghcr.io/sudo-flix/simple-proxy:latest
ports:
- "3000:3000"
networks:
- sudo-flix-network
restart: unless-stopped
sudo-flix-proxy:
image: ghcr.io/sudo-flix/simple-proxy:latest
ports:
- "3000:3000"
networks:
- sudo-flix-network
restart: unless-stopped
networks:
sudo-flix-network:
driver: bridge
networks:
sudo-flix-network:
driver: bridge
```
**Important:**
* Replace `YourPasswordHere` with your secure database password.
@ -81,15 +85,20 @@
* 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 `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
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.
**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/).

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.*/}
1. Set up a proxy using one of our [guides](../proxy/deploy.mdx), [though we recommend Netlify](../proxy/deploy.mdx#method-1-netlify-easy).
2. Once that's done, go to the **Connections** section of the **Settings page** on your sudo-flix instance of choice.
3. Enable `Use custom proxy workers` if it's not already enabled.
4. Add a new custom proxy by clicking `Add new worker`.
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>
<Steps.Step>
Set up a proxy using one of our [guides](../proxy/deploy.mdx), [though we recommend Netlify](../proxy/deploy.mdx#method-1-netlify-easy).
</Steps.Step>
<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>
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)
1. Create a GitHub account at https://github.com/signup if you don't have one already.
1. Click on the `Deploy to Netlify` button above.
1. Authorize Netlify to connect with GitHub by clicking the `Connect to GitHub` button.
1. There should now be a `Save & Deploy` button, click it.
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.
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)!
<Steps>
<Steps.Step>
Create a GitHub account at https://github.com/signup if you don't have one already.
</Steps.Step>
<Steps.Step>
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)
@ -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)
1. Create a GitHub account at https://github.com if you don't have one.
1. Click the `Deploy with workers` button above.
1. Click the `Authorize Workers` button to authorize Cloudflare to talk to GitHub.
1. Authorize Cloudflare Workers in the GitHub page that pops up.
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.
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.
1. Paste the account ID into the text box on the original Cloudflare workers page.
1. Click the link to [`My Profile`](https://dash.cloudflare.com/profile/api-tokens), to create an API token.
1. Click `Create Token`.
1. Select `Use template` next to `Edit Cloudflare Workers`.
1. Under `Account Resources`, select `Include` and your account under the dropdown.
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`.
1. On the next screen, click `Create token`.
1. Copy the API token and **save it in a safe place, it won't be shown again**.
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.
1. Click `Deploy` to deploy to Cloudflare Workers.
1. Congratulations! Your worker is now deploying. Please wait for the GitHub Action to build and publish your worker.
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.
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).
<Steps>
<Steps.Step>
Create a GitHub account at https://github.com if you don't have one.
</Steps.Step>
<Steps.Step>
Click the `Deploy with workers` button above.
</Steps.Step>
<Steps.Step>
Click the `Authorize Workers` button to authorize Cloudflare to talk to GitHub.
</Steps.Step>
<Steps.Step>
Authorize Cloudflare Workers in the GitHub page that pops up.
</Steps.Step>
<Steps.Step>
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.
</Steps.Step>
<Steps.Step>
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)
@ -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.
</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)
1. If you are signing up for an account, make sure to verify your email before going further!
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).
1. Go to `Workers & Pages` and then `Overview` in the left-hand navigation bar.
1. Click the `Create Worker` button
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!
1. On the `Congratulations` web page, click the `Edit code` button to edit the code in the worker you have just created.
1. There should now be a code editor on the left hand side on the web page.
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.
1. Back in your browser, paste the contents of the file into the code editor.
1. The `Save and deploy` button in the top right corner should now be active, click it to deploy your proxy!
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.
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)!
<Steps>
<Steps.Step>
Login to your Cloudflare account if you have one, otherwise create one [here](https://dash.cloudflare.com/sign-up?to=/:account/workers-and-pages)
- If you are signing up for an account, make sure to verify your email before going further!
</Steps.Step>
<Steps.Step>
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).
</Steps.Step>
<Steps.Step>
Go to `Workers & Pages` and then `Overview` in the left-hand navigation bar.
</Steps.Step>
<Steps.Step>
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)
@ -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)
1. Login to your [Railway](https://railway.app) account if you have one, otherwise create one [here](https://railway.app/login).
1. If you are signing up, then verify your account by clicking the link in the email Railway sends you.
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.
1. Click the [`Deploy on Railway`](https://railway.app/template/dyYHq1) button above.
1. If a `Configure` button is displayed, click on it and allow Railway to access your GitHub account.
1. The `Deploy` button at the bottom of the template should be active, click on it.
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>
<Steps.Step>
Login to your [Railway](https://railway.app) account if you have one, otherwise create one [here](https://railway.app/login).
- If you are signing up, then verify your account by clicking the link in the email Railway sends you.
- 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.
</Steps.Step>
<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

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!
</Caution>
1. On sudo-flix, click the menu icon at the top right and then `Settings`.
1. Scroll down the page to the `Connections` section.
1. Enable the `Custom server` toggle and enter your backend URL in the input box that appears.
1. Click `Save` at the bottom right corner of your screen.
<Steps>
<Steps.Step>
On sudo-flix, click the menu icon at the top right and then `Settings`.
</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