Rename numbers

This commit is contained in:
mrjvs
2023-12-12 20:12:52 +01:00
parent 31690529eb
commit c4d1622922
26 changed files with 2 additions and 9 deletions

View File

@@ -0,0 +1,33 @@
---
title: 'Start self-hosting'
---
# How to self host
::alert{type="info"}
We **do not** provide support on how to self-host. If you can't figure it out then tough luck. Please do not make GitHub issues or ask in our Discord server for support on how to self-host.
::
There are a few configurations of hosting movie-web. Each with their own benefits.
**If you don't know what to choose, go with method 1.**
## Method 1 - only host the frontend
With this method, you only host the essential parts that make movie-web work. But keep using the account server from offical movie-web.
This method is the easiest to self-host and is recommended for most users.
1. [Setup the Proxy!](2.proxy.md)
2. [Setup the Client!](3.client.md)
## Method 2 - only host the account server
If you want to own your own data, it's possible to selfhost just the account server and nothing else.
This method is only recommended if you have experience hosting databases or other similar stateful applications.
1. [Setup the Backend!](4.backend.md)
2. [Configure the Client!](5.use-backend.md)
## Method 3 - host everything
If you want an instance that's completely isolated from official movie-web. You can selfhost all parts.
This method is not recommended for inexperienced hosters.
1. [Setup the Proxy!](2.proxy.md)
2. [Setup the Backend!](4.backend.md)
3. [Setup the Client!](3.client.md)

View File

@@ -0,0 +1,40 @@
---
title: 'The proxy'
---
# Setting up the proxy
Our proxy is used to bypass CORS-protected URLs on the client side, allowing users to make requests to protected endpoints without a backend server.
The proxy is made using [Nitro by UnJS](https://nitro.unjs.io/) which supports building the proxy to work on multiple providers including Cloudflare Workers, AWS Lambda and [more...](https://nitro.unjs.io/deploy)
Our recommended provider is Cloudflare due to its [generous free plan](https://www.cloudflare.com/en-gb/plans/developer-platform/).
## Cloudflare Workers
The proxy is made as a Cloudflare worker. Cloudflare has a generous free plan, so you don't need to pay anything unless you get hundreds of users.
[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/movie-web/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 authorise 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" to find your account ID.
1. If you have used workers in the past, there will be a place on the right hand side to copy your account ID.
1. If you haven't used workers before, 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" 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" 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 -> proxy.

View File

@@ -0,0 +1,54 @@
---
title: 'The client'
---
# Setting up the client
## Method 1 - Vercel - Recommended
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fmovie-web%2Fmovie-web%2Ftree%2Fmaster&env=VITE_CORS_PROXY_URL,VITE_TMDB_READ_API_KEY)
1. Click the Deploy button.
1. Sign in using either a GitHub, GitLab, or Bitbucket.
1. Follow the instructions to create a repository for movie-web.
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 [below](#tmdb-api-key) on how to get an API key.
- `VITE_BACKEND_URL`: Only set if you have a selfhosted backend. Put in your backend URL. Check out [configuration reference](../4.client/2.configuration.md) for details. Make sure to not have a slash at the end of the URL.
1. Click "Deploy"
1. Congrats! You have your own version of movie-web 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).
## Method 2 - Any Static Web Host
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 `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 [below](#tmdb-api-key) on how to get an API key.
6. Save the file.
7. Upload **all** of the files to a static website hosting such as:
- GitHub Pages
- Netlify
- Vercel
- Etc, there are lots - Google it if the ones above don't work for you.
1. Congrats! You have your own version of movie-web hosted.
## TMDB API Key
In order to search for movies and TV shows, we use an API called "The Movie Database" (TMDB). In order for your client to be able to search, you need to generate an API key.
::alert{type="info"}
The API key is **free**, you just need to create an account.
::
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**

View File

@@ -0,0 +1,6 @@
---
title: 'The backend'
---
# Setting up the backend
// EXPLAIN HOW TO HOST THE BACKEND

View File

@@ -0,0 +1,6 @@
---
title: 'Configure backend'
---
# Configure your client with the backend
// EXPLAIN HOW TO SET BACKEND URL ON OFFICIAL INSTANCE

View File

@@ -0,0 +1,7 @@
---
title: 'PWA vs no-PWA'
---
# About selfhosting PWA
// EXPLAIN WHY ITS A BAD IDEA, BUT ALSO HOW TO DO IT

View File

@@ -0,0 +1,8 @@
---
title: 'Troubleshooting'
---
# Troubleshooting
// EXPLAIN HOW TO TROUBLESHOOT
// MENTION ADMIN PAGE FOR TROUBLESHOOTING

View File

@@ -0,0 +1,3 @@
title: 'Self-Hosting'
icon: mdi:server-network
navigation.redirect: /self-hosting/hosting-intro