chore(deploy): Docker production config, nginx gzip/cache, deploy docs

- docker-compose.yml: restart always, env_file, named volume, start_period
- frontend/nginx.conf: gzip compression, cache headers for assets, no-cache for SW
- Makefile: add prod-down and prod-logs targets
- docs/DEPLOY.md: Dokploy + Cloudflare Tunnel deploy instructions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 17:20:36 +02:00
parent 6f82c56995
commit a16d01a669
4 changed files with 168 additions and 6 deletions

View File

@@ -3,10 +3,38 @@ server {
root /usr/share/nginx/html;
index index.html;
# Gzip compression
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_min_length 256;
gzip_types
text/plain
text/css
text/javascript
application/javascript
application/json
application/manifest+json
image/svg+xml;
# SPA routing
location / {
try_files $uri $uri/ /index.html;
}
# Static assets - long cache
location /assets {
expires 1y;
add_header Cache-Control "public, immutable";
}
# Service worker - no cache
location /sw.js {
expires off;
add_header Cache-Control "no-store, no-cache, must-revalidate";
}
# API proxy
location /api {
proxy_pass http://backend:8000;
proxy_set_header Host $host;