Port all documents to MDX

This commit is contained in:
mrjvs
2024-03-30 20:34:50 +01:00
parent c06bedc93c
commit 268014552c
30 changed files with 62 additions and 120 deletions

View File

@@ -0,0 +1,23 @@
---
title: 'PWA vs no-PWA'
---
# About Self-hosting PWA
So that clients can have a more native app-like experience on mobile, movie-web has a function to support Progressive Web Apps (PWA). You can learn more about what a PWA is [here](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/What_is_a_progressive_web_app).
In movie-web version 3, PWAs were enabled by default. Unfortunately, PWAs tend to come with caching complications that can be tricky to resolve. That's why we have **disabled** PWAs by default in movie-web version 4. If you are upgrading from version 3, please [read our upgrade guide](../3.client/5.upgrade.md) for more information.
::alert{type="warning"}
Enabling PWAs means that you cannot disable it again - Please only proceed if you know what you are doing!
::
## If you are running movie-web on a hosting platform such as Vercel
If your hosting is building movie-web from the source, you can enable PWAs using the [`VITE_PWA_ENABLED`](../3.client/3.configuration.md#vite_pwa_enabled) environment variable.
Setting [`VITE_PWA_ENABLED`](../3.client/3.configuration.md#vite_pwa_enabled) to `true` will generate a [service worker file](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable#service_worker) and a [web app manifest](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable#the_web_app_manifest) which enable the website to be installed from a [web browser both on Desktop and on Mobile](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable#installation_from_the_web).
## If you are running movie-web using the .zip files
If you are downloading the movie-web `zip` files from our GitHub and installing them on a static website host, then all you need to do is to make sure to download the [`movie-web.pwa.zip`](https://github.com/movie-web/movie-web/releases/latest/download/movie-web.pwa.zip) file instead of the `movie-web.zip` file!

View File

@@ -0,0 +1,36 @@
---
title: 'Start self-hosting'
---
# How to self-host
::alert{type="info"}
We provide support on a case-by-case basis. If you have any questions, feel free to ask in our [Discord server](https://movie-web.github.io/links/discord).
::
Since movie-web has many different components, there are a few configurations of how you can host it. Each of these configurations has their own benefits, whether that be having complete control over your data or customizing your experience.
**If you don't know what to choose, go with [method 1.](#method-1---only-host-the-frontend)**
## 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 official movie-web.
This method is the easiest to self-host and is recommended for most users.
1. [Set up the Proxy!](../2.proxy/1.deploy.md)
2. [Set up the Client!](../3.client/1.deploy.md)
## Method 2 - Only host the account server
If you want to own your own data, it's possible to self-host just the account server and nothing else.
This method is only recommended if you have experience hosting databases or other similar stateful applications.
1. [Set up the Backend!](../4.backend/1.deploy.md)
2. [Configure the Client!](../3.client/1.deploy.md)
## Method 3 - Host everything
If you want an instance that's completely isolated from the official movie-web. You can self-host all of the parts yourself, though this method is not recommended for inexperienced hosters.
1. [Set up the Proxy!](../2.proxy/1.deploy.md)
2. [Set up the Backend!](../4.backend/1.deploy.md)
3. [Set up the Client!](../3.client/1.deploy.md)

View File

@@ -0,0 +1,45 @@
---
title: 'Troubleshooting'
---
# Troubleshooting
There is always a possibility for something to go wrong while trying to deploy your own instance of movie-web. This page will contain common issues people have come across while self-hosting and their solutions.
## "Failed to find media, try again!" while searching
**This is likely a misconfigured TMDB API key.** To verify that TMDB is the issue, visit `/admin` or `/#/admin` and click on the `Test TMDB` button.
If the test succeeds, then your TMDB configuration is correct and the issue is with something else.
If the test fails, then you should recheck your credentials. [**Make sure you're using the Read Access Token, not the normal API Key.**](https://www.themoviedb.org/settings/api#v4_auth_key){target="\_blank"}
## Everything I try to watch fails
**This is likely a misconfigured Worker.** To make sure that the Workers are the issue, visit `/admin` or `/#/admin`, then click on the `Test workers` button.
You should have at least 1 Worker registered, if you don't, you should [deploy a worker](../2.proxy/1.deploy.md#method-1---cloudflare-easy) and [set it up in the client](../3.client/3.configuration.md#vite_cors_proxy_url).
If any Worker fails the test, you should double check its URL and see if its up to date with the latest updates.
## I can't make an account or login
**This is likely misconfigured or broken backend.** To verify that the backend is the issue, visit `/admin` or `/#/admin`, then click on the `Test backend` button.
If the backend is online and properly configured it should display the name and version of the backend. If the name and description of the test don't match your own instance, [make sure you have your backend URL set correctly.](../3.client/3.configuration.md#vite_backend_url)
If the test gives you an error, your [backend URL configuration option](../3.client/3.configuration.md#vite_backend_url) likely has a typo.
If the version that shows up on your backend is not the latest version, you should update your backend to keep up with the latest changes.
## I updated from version 3 to version 4 but I still see the old version
It is likely that you haven't installed the PWA version of movie-web. Please read the [upgrade guide](../3.client/5.upgrade.md) for more details on the matter.
## I'm getting SSL issues when using a hosted postgres database
You are most likely missing the [`postgres.ssl`](../4.backend/2.configuration.md#postgresssl) variable on your backend, enable it and the connection should work.
## Permission denied to set parameter "session_replication_role"
Set the `MIKRO_ORM_MIGRATIONS_DISABLE_FOREIGN_KEYS` option to `false` in either your `.env` or your Docker command.

View File

@@ -0,0 +1,16 @@
---
title: 'Configure backend'
---
# Configure your client with the backend
If you would like to use an alternative backend server (the server responsible for saving user data across devices) then you can specify your own URL **without needing to host your own movie-web frontend!**
::alert{type="danger"}
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!
::
1. On movie-web, 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.