Files
GMW/infra/docker/nginx/nginx-frontend.conf
T

26 lines
713 B
Plaintext

# Nginx config for serving Astro-built static frontend files
server {
listen 3000;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Gzip compression for faster load times
gzip on;
gzip_types text/plain text/css application/json application/javascript image/svg+xml;
gzip_min_length 256;
# Cache Astro hashed assets (/_astro/) — immutable since hash changes
location /_astro/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# Astro SSG pages — each route is a real directory with index.html
# Fallback to 404 instead of index.html (no SPA catch-all)
location / {
try_files $uri $uri/ =404;
}
}