kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Add instructions for overriding docker nginx files
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2311>environments/review-docs-1664-292dbg/deployments/16542
rodzic
658b017c5e
commit
1a5c285e95
|
@ -140,7 +140,7 @@ That's it! Your Funkwhale pod is now up and running.
|
||||||
|
|
||||||
## 4. Set up your reverse proxy
|
## 4. Set up your reverse proxy
|
||||||
|
|
||||||
Funkwhale uses a reverse proxy to serve content to users. We use [Nginx](https://nginx.com) to serve this proxy. Follow this guide to install an Nginx configuration using details from your `.env` file.
|
Funkwhale requires a reverse proxy to serve content to users. We recommend using [Nginx](https://nginx.com) to handle requests to your container. To do this:
|
||||||
|
|
||||||
1. Install Nginx.
|
1. Install Nginx.
|
||||||
|
|
||||||
|
@ -185,6 +185,52 @@ That's it! You've created your Nginx file. Run the following command to check th
|
||||||
grep '${' /etc/nginx/sites-enabled/funkwhale.conf
|
grep '${' /etc/nginx/sites-enabled/funkwhale.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Override default Nginx templates
|
||||||
|
|
||||||
|
The frontend container ships default Nginx templates which serve content to the reverse proxy. These files read variables from your `.env` file to correctly serve content. In some cases, you might want to override these defaults. To do this:
|
||||||
|
|
||||||
|
1. Create a `/srv/funkwhale/nginx` directory to house your files.
|
||||||
|
|
||||||
|
```{code-block} sh
|
||||||
|
mkdir /srv/funkwhale/nginx
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Download the Nginx template files to the `/srv/funkwhale/nginx` directory.
|
||||||
|
|
||||||
|
```{code-block} sh
|
||||||
|
curl -L -o /srv/funkwhale/nginx/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/${FUNKWHALE_VERSION}/deploy/docker.nginx.template"
|
||||||
|
curl -L -o /srv/funkwhale/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/${FUNKWHALE_VERSION}/deploy/docker.funkwhale_proxy.conf"
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Make any changes you want to make to these files.
|
||||||
|
4. Open your `docker-compose.yml` file in a text editor. For this example, we will use `nano`.
|
||||||
|
|
||||||
|
```{code-block} sh
|
||||||
|
nano /srv/funkwhale/docker-compose.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Uncomment the lines in the `volumes` section of the `front` service by deleting the `#` in front of them.
|
||||||
|
|
||||||
|
```{code-block} yaml
|
||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
front:
|
||||||
|
volumes:
|
||||||
|
# Uncomment if you want to use your previous nginx config, please let us
|
||||||
|
# know what special configuration you need, so we can support it with out
|
||||||
|
# upstream nginx configuration!
|
||||||
|
- "./nginx/funkwhale.template:/etc/nginx/conf.d/funkwhale.template:ro"
|
||||||
|
- "./nginx/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro"
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Bring the `front` container up again to pick up the changes.
|
||||||
|
|
||||||
|
```{code-block} sh
|
||||||
|
docker-compose up -d front
|
||||||
|
```
|
||||||
|
|
||||||
|
That's it! The container mounts your custom nginx files and uses its values to serve Funkwhale content. To revert to the default values, comment out the volumes by adding a `#` in front of them and bring the `front` container back up.
|
||||||
|
|
||||||
## 5. Set up TLS
|
## 5. Set up TLS
|
||||||
|
|
||||||
To enable your users to connect to your pod securely, you need to set up {abbr}`TLS (Transport Layer Security)`. To do this, we recommend using the <acme.sh> script.
|
To enable your users to connect to your pod securely, you need to set up {abbr}`TLS (Transport Layer Security)`. To do this, we recommend using the <acme.sh> script.
|
||||||
|
|
Ładowanie…
Reference in New Issue