Add Docker deployment for Dokploy (nginx static serve)

This commit is contained in:
Nicolas Civade
2026-08-13 11:25:31 +02:00
parent c55e0751e6
commit 5c7276cf35
3 changed files with 71 additions and 0 deletions

29
nginx.conf Normal file
View File

@@ -0,0 +1,29 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Gzip text assets
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
# Hashed build assets are immutable -> cache aggressively
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}
# SPA history fallback: unknown routes serve index.html
location / {
try_files $uri $uri/ /index.html;
}
# Never cache the HTML entrypoint so new deploys are picked up immediately
location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
}