docs: add reverse proxy setup instructions to README

This commit is contained in:
FuzzyGrim
2025-02-06 14:11:33 +01:00
parent b6bc6c7659
commit 5e7aaca6aa

View File

@@ -37,32 +37,47 @@ docker-compose up -d
Alternatively, if you need a PostgreSQL database, you can use the `docker-compose.postgres.yml` file.
### Reverse Proxy Setup
When using a reverse proxy, if you see a Forbidden error, you need to set the `URLS` environment variable to the URL you are using for the app.
```bash
services:
yamtrack:
...
environment:
- URLS=https://yamtrack.mydomain.com
...
```
Note that the setting must include the correct protocol (`https` or `http`), and must not include the application `/` context path. Multiple origins can be specified by separating them with a comma (`,`).
### Environment variables
| Name | Type | Notes |
| --------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| TMDB_API | String | The Movie Database API key for movies and tv shows, a default key is provided |
| TMDB_NSFW | Bool | Default to false, set to true to include adult content in tv and movie searches |
| TMDB_LANG | String | TMDB metadata language, uses a Language code in ISO 639-1 e.g "en", for more specific results a country code in ISO 3166-1 can be added e.g "en-US" |
| MAL_API | String | MyAnimeList API key, for anime and manga, a default key is provided |
| MAL_NSFW | Bool | Default to false, set to true to include adult content in anime and manga searches from MyAnimeList |
| MU_NSFW | Bool | Default to false, set to true to include adult content in manga searches from MangaUpdates |
| IGDB_ID | String | IGDB API key for games, a default key is provided but it's recommended to get your own as it has a low rate limit |
| IGDB_SECRET | String | IGDB API secret for games, a default value is provided but it's recommended to get your own as it has a low rate limit |
| IGDB_NSFW | Bool | Default to false, set to true to include adult content in game searches |
| SIMKL_ID | String | Simkl API key only needed for importing media from Simkl, a default key is provided but you can get one at [Simkl Developer](https://simkl.com/settings/developer/new/custom-search/) if needed |
| SIMKL_SECRET | String | Simkl API secret for importing media from Simkl, a default secret is provided but you can get one at [Simkl Developer](https://simkl.com/settings/developer/new/custom-search/) if needed |
| REDIS_URL | String | Default to redis://localhost:6379, Redis is needed for processing background tasks, set this to your redis server url |
| SECRET | String | [Secret key](https://docs.djangoproject.com/en/stable/ref/settings/#secret-key) used for cryptographic signing, should be a random string |
| URLS | List | This setting can be used to set the URLs of the app for the CSRF and ALLOWED_HOSTS settings, e.g. `https://app.example.com` |
| ALLOWED_HOSTS | List | Host/domain names that this Django site can serve, e.g. `app.example.com`. See [Django documentation](https://docs.djangoproject.com/en/stable/ref/settings/#allowed-hosts) for more details. |
| CSRF | List | A list of trusted origins for unsafe requests, e.g. `https://app.example.com`. See [Django documentation](https://docs.djangoproject.com/en/stable/ref/settings/#csrf-trusted-origins) for more |
| REGISTRATION | Bool | Default to true, set to false to disable user registration |
| DEBUG | Bool | Default to false, set to true for debugging |
| PUID | Int | User ID for the app, default to 1000 |
| PGID | Int | Group ID for the app, default to 1000 |
| TZ | String | Timezone, default to UTC |
| WEB_CONCURRENCY | Int | Number of webserver processes, default to 1 but it's recommended to have a value of [(2 x num cores) + 1](https://docs.gunicorn.org/en/latest/design.html#how-many-workers) |
| Name | Type | Notes |
| --------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| TMDB_API | String | The Movie Database API key for movies and tv shows, a default key is provided |
| TMDB_NSFW | Bool | Default to false, set to true to include adult content in tv and movie searches |
| TMDB_LANG | String | TMDB metadata language, uses a Language code in ISO 639-1 e.g "en", for more specific results a country code in ISO 3166-1 can be added e.g "en-US" |
| MAL_API | String | MyAnimeList API key, for anime and manga, a default key is provided |
| MAL_NSFW | Bool | Default to false, set to true to include adult content in anime and manga searches from MyAnimeList |
| MU_NSFW | Bool | Default to false, set to true to include adult content in manga searches from MangaUpdates |
| IGDB_ID | String | IGDB API key for games, a default key is provided but it's recommended to get your own as it has a low rate limit |
| IGDB_SECRET | String | IGDB API secret for games, a default value is provided but it's recommended to get your own as it has a low rate limit |
| IGDB_NSFW | Bool | Default to false, set to true to include adult content in game searches |
| SIMKL_ID | String | Simkl API key only needed for importing media from Simkl, a default key is provided but you can get one at [Simkl Developer](https://simkl.com/settings/developer/new/custom-search/) if needed |
| SIMKL_SECRET | String | Simkl API secret for importing media from Simkl, a default secret is provided but you can get one at [Simkl Developer](https://simkl.com/settings/developer/new/custom-search/) if needed |
| REDIS_URL | String | Default to redis://localhost:6379, Redis is needed for processing background tasks, set this to your redis server url |
| SECRET | String | [Secret key](https://docs.djangoproject.com/en/stable/ref/settings/#secret-key) used for cryptographic signing, should be a random string |
| URLS | List | This setting can be used to set the URLs of the app for the CSRF and ALLOWED_HOSTS settings, e.g. `https://yamtrack.mydomain.com` |
| ALLOWED_HOSTS | List | Host/domain names that this Django site can serve, e.g. `yamtrack.mydomain.com`. See [Django documentation](https://docs.djangoproject.com/en/stable/ref/settings/#allowed-hosts) for more details. |
| CSRF | List | A list of trusted origins for unsafe requests, e.g. `https://yamtrack.mydomain.com`. See [Django documentation](https://docs.djangoproject.com/en/stable/ref/settings/#csrf-trusted-origins) for more |
| REGISTRATION | Bool | Default to true, set to false to disable user registration |
| DEBUG | Bool | Default to false, set to true for debugging |
| PUID | Int | User ID for the app, default to 1000 |
| PGID | Int | Group ID for the app, default to 1000 |
| TZ | String | Timezone, default to UTC |
| WEB_CONCURRENCY | Int | Number of webserver processes, default to 1 but it's recommended to have a value of [(2 x num cores) + 1](https://docs.gunicorn.org/en/latest/design.html#how-many-workers) |
### Environment variables for PostgreSQL
@@ -116,4 +131,3 @@ Go to: http://localhost:8000
If you like the project and want to support it, you can donate via:
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/fuzzygrim)