Files
gold_land_user/nginx.conf
T
safavimohadeseh78andCursor 653f1b0c5a feat(docker): add nginx frontend image and full-stack compose
Build static assets with Vite, proxy /api to backend, and document server env vars.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 10:13:43 +02:00

28 lines
629 B
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# API requests proxied to the NestJS backend (same Docker network).
location /api/ {
proxy_pass http://backend:3000;
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_set_header X-Forwarded-Proto $scheme;
}
location /health {
proxy_pass http://backend:3000/health;
proxy_http_version 1.1;
proxy_set_header Host $host;
}
location / {
try_files $uri $uri/ /index.html;
}
}