From 0cedc72bb34a29ff86499cdf67032640d543cb09 Mon Sep 17 00:00:00 2001 From: Christopher Dixon Date: Tue, 27 Feb 2024 22:17:34 -0500 Subject: [PATCH 1/4] Update client docs - 3rd option docker compose --- content/3.client/1.deploy.md | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/content/3.client/1.deploy.md b/content/3.client/1.deploy.md index 8942d7a..a70ec2f 100644 --- a/content/3.client/1.deploy.md +++ b/content/3.client/1.deploy.md @@ -43,3 +43,42 @@ title: 'Deploy' - Vercel - Etc, [there are lots of options](https://www.staticwebsitehosting.org/){target="\_blank"}. 9. Congrats! You have your own version of movie-web hosted. + +## Method 3 - Docker Compose - Home Network + +This method is meant for those using a desktop device or single board computer with a minimum 4GB of RAM such as a [Raspberry Pi](https://www.raspberrypi.com/) to run movie-web on there home network to make a private instance of movie-web available to their network devices. + +1. Download the file `movie-web.zip` from the latest release: https://github.com/movie-web/movie-web/releases/latest. +2. Extract the ZIP file so you can edit the files. +3. Open `docker-compose.yaml` and 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`. +4. 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): `VITE_CORS_PROXY_URL: "https://test-proxy.test.workers.dev"` + +5. Put your TMDB Read Access Token inside the quotes of `TMDB_READ_API_KEY: ""`. Please read [the TMDB page](2.tmdb.md) on how to get an API key. +6. Uncomment and add any [additional environment variables](3.configuration.md) you may need +7. Save the file +8. Use [docker] to run `movieweb` as background service + +```bash +# movie-web is current working directory +$ docker compose up -d +``` + +9. Verify that setup was successful +- Navigate to `http://localhost`. You should see the UI for `movie-web`. Find something to watch and make sure that it plays. +- View logs with + + ```bash + $ docker compose logs --follow movieweb + ``` + +10. 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) + +11. Navigate to movie web at `http:// Date: Thu, 29 Feb 2024 19:35:02 -0500 Subject: [PATCH 2/4] update build.context --- content/3.client/1.deploy.md | 58 ++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/content/3.client/1.deploy.md b/content/3.client/1.deploy.md index a70ec2f..482e730 100644 --- a/content/3.client/1.deploy.md +++ b/content/3.client/1.deploy.md @@ -46,28 +46,57 @@ title: 'Deploy' ## Method 3 - Docker Compose - Home Network -This method is meant for those using a desktop device or single board computer with a minimum 4GB of RAM such as a [Raspberry Pi](https://www.raspberrypi.com/) to run movie-web on there home network to make a private instance of movie-web available to their network 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 movie-web on there home network for network connected devices. -1. Download the file `movie-web.zip` from the latest release: https://github.com/movie-web/movie-web/releases/latest. -2. Extract the ZIP file so you can edit the files. -3. Open `docker-compose.yaml` and uncomment `args`, `TMDB_READ_API_KEY`, `CORS_PROXY_URL`. +1. Ensure you have [docker](https://docs.docker.com/get-docker/) installed. In a newly created directory called `movie-web` 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/movie-web/movie-web.git + # args: + # PWA_ENABLED: "false" + # GA_ID: "" + # APP_DOMAIN: "" + # OPENSEARCH_ENABLED: "false" + # TMDB_READ_API_KEY: "" + # CORS_PROXY_URL: "" + # DMCA_EMAIL: "" + # NORMAL_ROUTER: "false" + # BACKEND_URL: "" + # HAS_ONBOARDING: "false" + # ONBOARDING_CHROME_EXTENSION_INSTALL_LINK: "" + # ONBOARDING_PROXY_INSTALL_LINK: "" + # DISALLOWED_IDS: "" + # CDN_REPLACEMENTS: "" + # TURNSTILE_KEY: "" + 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`. -4. 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. +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): `VITE_CORS_PROXY_URL: "https://test-proxy.test.workers.dev"` + Example (THIS IS AN EXAMPLE, IT WON'T WORK FOR YOU): `CORS_PROXY_URL: "https://test-proxy.test.workers.dev"` -5. Put your TMDB Read Access Token inside the quotes of `TMDB_READ_API_KEY: ""`. Please read [the TMDB page](2.tmdb.md) on how to get an API key. -6. Uncomment and add any [additional environment variables](3.configuration.md) you may need -7. Save the file -8. Use [docker] to run `movieweb` as background service +4. Put your TMDB Read Access Token inside the quotes of `TMDB_READ_API_KEY: ""`. Please read [the TMDB page](2.tmdb.md) on how to get an API key. +5. Uncomment and add any [additional environment variables](3.configuration.md) you may need. +6. Save the file! +7. Now use [docker](https://docs.docker.com/get-docker/) to run `movieweb` as background service. ```bash -# movie-web is current working directory +# movie-web is the current working directory $ docker compose up -d ``` -9. Verify that setup was successful +8. Verify that setup was successful - Navigate to `http://localhost`. You should see the UI for `movie-web`. Find something to watch and make sure that it plays. - View logs with @@ -75,10 +104,9 @@ $ docker compose up -d $ docker compose logs --follow movieweb ``` -10. Set a static IP address for your device. +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) -11. Navigate to movie web at `http:// Date: Thu, 29 Feb 2024 19:46:36 -0500 Subject: [PATCH 3/4] let users now how to update the container --- content/3.client/1.deploy.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/content/3.client/1.deploy.md b/content/3.client/1.deploy.md index 482e730..773f80e 100644 --- a/content/3.client/1.deploy.md +++ b/content/3.client/1.deploy.md @@ -110,3 +110,16 @@ $ docker compose up -d - For Windows: [guide](https://www.pcmag.com/how-to/how-to-set-up-a-static-ip-address) 10. Navigate to movie web at `http:// Date: Tue, 5 Mar 2024 09:27:57 -0500 Subject: [PATCH 4/4] review 2: client docs --- content/3.client/1.deploy.md | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/content/3.client/1.deploy.md b/content/3.client/1.deploy.md index 773f80e..d718b9d 100644 --- a/content/3.client/1.deploy.md +++ b/content/3.client/1.deploy.md @@ -59,21 +59,9 @@ services: build: context: https://github.com/movie-web/movie-web.git # args: - # PWA_ENABLED: "false" - # GA_ID: "" - # APP_DOMAIN: "" - # OPENSEARCH_ENABLED: "false" # TMDB_READ_API_KEY: "" # CORS_PROXY_URL: "" - # DMCA_EMAIL: "" - # NORMAL_ROUTER: "false" # BACKEND_URL: "" - # HAS_ONBOARDING: "false" - # ONBOARDING_CHROME_EXTENSION_INSTALL_LINK: "" - # ONBOARDING_PROXY_INSTALL_LINK: "" - # DISALLOWED_IDS: "" - # CDN_REPLACEMENTS: "" - # TURNSTILE_KEY: "" ports: - "80:80" restart: unless-stopped @@ -87,13 +75,13 @@ services: 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](2.tmdb.md) on how to get an API key. -5. Uncomment and add any [additional environment variables](3.configuration.md) you may need. +5. Uncomment and add any [additional environment variables](3.configuration.md) 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 # movie-web is the current working directory -$ docker compose up -d +$ docker compose up --detach ``` 8. Verify that setup was successful @@ -116,10 +104,6 @@ $ docker compose up -d 1. Make sure `movie-web` is your current working directory and run: ```bash -# Stop the running container -$ docker compose stop -# Remove the stopped container -$ docker compose rm # Re-build the image and start the container -$ docker compose up -d +$ docker compose up --build --detach ```