From a79b29e551af7e276930a78c2d312a1d4171c586 Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Mon, 24 Feb 2025 23:51:51 +0100 Subject: [PATCH] Let NodeBB's NGINX serve more static files --- .vscode/settings.json | 3 +++ roles/docker/templates/compose-files/fedi_dk_nodebb.yml.j2 | 1 + roles/docker/templates/fedi_dk_nodebb/nginx/http.conf.j2 | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9d14cfb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "ansible.python.interpreterPath": "/bin/python" +} \ No newline at end of file diff --git a/roles/docker/templates/compose-files/fedi_dk_nodebb.yml.j2 b/roles/docker/templates/compose-files/fedi_dk_nodebb.yml.j2 index c501d90..96cd08c 100644 --- a/roles/docker/templates/compose-files/fedi_dk_nodebb.yml.j2 +++ b/roles/docker/templates/compose-files/fedi_dk_nodebb.yml.j2 @@ -8,6 +8,7 @@ services: volumes: - "./nginx:/etc/nginx/conf.d:ro" - "./build:/usr/src/app/build:ro" + - "./uploads:/usr/src/app/public/uploads:rw" environment: VIRTUAL_HOST: {{ services.fedi_dk_nodebb.domain }} VIRTUAL_PORT: 80 diff --git a/roles/docker/templates/fedi_dk_nodebb/nginx/http.conf.j2 b/roles/docker/templates/fedi_dk_nodebb/nginx/http.conf.j2 index 6940550..4bf4270 100644 --- a/roles/docker/templates/fedi_dk_nodebb/nginx/http.conf.j2 +++ b/roles/docker/templates/fedi_dk_nodebb/nginx/http.conf.j2 @@ -45,7 +45,7 @@ server { location ~ ^/assets/(.*) { root /usr/src/app; - try_files /build/public/$1 @nodebb; + try_files /build/public/$1 /public/$1 @nodebb; } location / {