35 lines
979 B
Nginx Configuration File
35 lines
979 B
Nginx Configuration File
# nginx per thothii-frontend: serve la SPA e inoltra /api al core sulla rete Compose.
|
|
server {
|
|
listen 8080;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# SPA fallback (standalone)
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Reverse proxy verso il backend (stessa rete Docker)
|
|
location /api/ {
|
|
proxy_pass http://core:8787/;
|
|
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;
|
|
|
|
# SSE: niente buffering, timeout lunghi
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
proxy_read_timeout 86400s;
|
|
proxy_send_timeout 86400s;
|
|
chunked_transfer_encoding on;
|
|
}
|
|
|
|
# manifest.json è servito come JSON.
|
|
location = /manifest.json {
|
|
default_type application/json;
|
|
}
|
|
}
|