2026-06-19 11:28:04 +03:00
|
|
|
server {
|
|
|
|
|
listen 80;
|
|
|
|
|
server_name _;
|
2026-06-20 19:13:05 +03:00
|
|
|
|
2026-06-19 11:28:04 +03:00
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
index index.html;
|
|
|
|
|
|
2026-06-20 19:13:05 +03:00
|
|
|
# SPA fallback
|
2026-06-19 11:28:04 +03:00
|
|
|
location / {
|
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-20 19:13:05 +03:00
|
|
|
# API + SSE
|
2026-06-19 11:28:04 +03:00
|
|
|
location /api/ {
|
|
|
|
|
proxy_pass http://backend:8000;
|
2026-06-20 19:13:05 +03:00
|
|
|
proxy_http_version 1.1;
|
2026-06-19 11:28:04 +03:00
|
|
|
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;
|
2026-06-20 19:13:05 +03:00
|
|
|
|
|
|
|
|
# SSE: disable buffering
|
2026-06-19 11:28:04 +03:00
|
|
|
proxy_buffering off;
|
|
|
|
|
proxy_cache off;
|
|
|
|
|
proxy_read_timeout 300s;
|
2026-06-20 19:13:05 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Static assets (icons, uploads)
|
|
|
|
|
location /static/ {
|
|
|
|
|
proxy_pass http://backend:8000;
|
2026-06-19 11:28:04 +03:00
|
|
|
}
|
|
|
|
|
}
|