From 982e3c5189db862024f9708a9623df4bd01f2aa9 Mon Sep 17 00:00:00 2001 From: Trevor Bergeron <mal@sec.gd> Date: Sun, 27 Sep 2020 16:53:41 -0400 Subject: [PATCH] Add setting for custom nginx config --- README.md | 1 + defaults/main.yml | 1 + templates/nginx.conf.j2 | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 63cc381..28d0c17 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,7 @@ Role Variables | `funkwhale_letsencrypt_enabled` | `true` | If `true`, will configure SSL with certbot and Let's Encrypt | | `funkwhale_media_path` | `/srv/funkwhale/data/media` | Path where audio and uploaded files should be stored (**no trailing slash**) | | `funkwhale_music_path` | `/srv/funkwhale/data/music` | Path to your existing music library, to use with [CLI import](https://docs.funkwhale.audio/admin/importing-music.html) (**no trailing slash**) | +| `funkwhale_nginx_additional_config` | `""` | Additional nginx configuration to add to the Funkwhale `server{}` block | | `funkwhale_nginx_managed` | `true` | If `true`, will install and configure nginx | | `funkwhale_nginx_max_body_size` | `100M` | Value of nginx's `max_body_size` parameter to use | | `funkwhale_protocol` | `https` | If set to `https`, will configure Funkwhale and Nginx to work behind HTTPS. Use `http` to completely disable SSL. | diff --git a/defaults/main.yml b/defaults/main.yml index 96c5c55..7b81f6e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -30,6 +30,7 @@ funkwhale_nginx_managed: true funkwhale_nginx_tls_termination: true funkwhale_nginx_max_body_size: 100M funkwhale_nginx_use_compression: true +funkwhale_nginx_additional_config: funkwhale_ssl_cert_path: funkwhale_ssl_key_path: funkwhale_protocol: https diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index e1e6ac7..ed3544e 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -144,4 +144,5 @@ server { return 403; } {% endif -%} +{{ funkwhale_nginx_additional_config }} } -- GitLab