This commit is contained in:
2026-03-27 23:42:39 -05:00
parent 6f7c038834
commit 1c8d6787b6
7 changed files with 314 additions and 77 deletions

28
nginx.conf Normal file
View File

@@ -0,0 +1,28 @@
server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html;
# SPA fallback
location / {
try_files $uri $uri/ /index.html;
}
# Proxy API requests to the Node.js backend running in the same container
location /api/ {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 60s;
}
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}