Add Docker setup: nginx frontend + backend compose

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-04-25 14:55:28 +02:00
1 parent a3ac8bef30
commit df69990625
4 files changed
+92

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
gzip on;
gzip_types text/css application/javascript application/json image/svg+xml;
gzip_min_length 1024;
# index.html – never cache so SW updates are picked up immediately
location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
# Static assets – long-term cache (cache busted by SW version)
location ~* \.(css|js)$ {
add_header Cache-Control "public, max-age=31536000, immutable";
}
# Service worker – no cache so browser always gets the latest version
location = /sw.js {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Service-Worker-Allowed "/";
}
# SPA fallback
location / {
try_files $uri $uri/ /index.html;
}
}