From 6453c170f70f30f4af2964240ebd5d02356808b8 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Thu, 22 Dec 2022 01:46:14 +0000 Subject: [PATCH] Fall back to static serving if not collected Fixes #218 --- docker/nginx.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker/nginx.conf b/docker/nginx.conf index 9187d87..f526d62 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -40,6 +40,13 @@ http { # Serves static files from the collected dir location /static/ { alias /takahe/static-collected/; + try_files $uri /static//static-real$uri; + } + + # Static fallback for dev mode + location /static-real/ { + internal; + proxy_pass http://takahe/; } # Proxies media and remote media with caching