Files
AICyclingCoach/frontend/nginx.conf
2025-09-10 11:46:57 -07:00

45 lines
1.1 KiB
Nginx Configuration File

worker_processes auto;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
# Cache control for static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}
# Next.js specific routes
location /_next/ {
alias /usr/share/nginx/html/_next/;
expires 365d;
add_header Cache-Control "public, max-age=31536000, immutable";
}
# Health check endpoint
location /healthz {
access_log off;
return 200 'ok';
}
}
}