mirror of
https://github.com/idrainformatica/PecFlow.git
synced 2026-06-16 12:45:42 +02:00
vboxes fix
This commit is contained in:
@@ -5,11 +5,15 @@ server {
|
||||
# Redirect HTTP → HTTPS in produzione (commentato per dev)
|
||||
# return 301 https://$host$request_uri;
|
||||
|
||||
# Resolver Docker interno – re-risolve i nomi dei container ogni 30s
|
||||
resolver 127.0.0.11 valid=30s ipv6=off;
|
||||
|
||||
# ── API Backend ───────────────────────────────────────────────────────────
|
||||
location /api/ {
|
||||
limit_req zone=api burst=20 nodelay;
|
||||
|
||||
proxy_pass http://backend:8000;
|
||||
set $backend_upstream http://backend:8000;
|
||||
proxy_pass $backend_upstream;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -30,7 +34,8 @@ server {
|
||||
location /api/v1/auth/login {
|
||||
limit_req zone=auth burst=5 nodelay;
|
||||
|
||||
proxy_pass http://backend:8000;
|
||||
set $backend_upstream http://backend:8000;
|
||||
proxy_pass $backend_upstream;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -40,24 +45,29 @@ server {
|
||||
|
||||
# ── Health check ──────────────────────────────────────────────────────────
|
||||
location /health {
|
||||
proxy_pass http://backend:8000;
|
||||
set $backend_upstream http://backend:8000;
|
||||
proxy_pass $backend_upstream;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
# ── Swagger UI (solo dev) ─────────────────────────────────────────────────
|
||||
location /docs {
|
||||
proxy_pass http://backend:8000;
|
||||
set $backend_upstream http://backend:8000;
|
||||
proxy_pass $backend_upstream;
|
||||
}
|
||||
location /redoc {
|
||||
proxy_pass http://backend:8000;
|
||||
set $backend_upstream http://backend:8000;
|
||||
proxy_pass $backend_upstream;
|
||||
}
|
||||
location /openapi.json {
|
||||
proxy_pass http://backend:8000;
|
||||
set $backend_upstream http://backend:8000;
|
||||
proxy_pass $backend_upstream;
|
||||
}
|
||||
|
||||
# ── WebSocket ─────────────────────────────────────────────────────────────
|
||||
location /ws/ {
|
||||
proxy_pass http://backend:8000;
|
||||
set $backend_upstream http://backend:8000;
|
||||
proxy_pass $backend_upstream;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
@@ -67,7 +77,8 @@ server {
|
||||
|
||||
# ── Frontend React (Vite dev server) ─────────────────────────────────────
|
||||
location / {
|
||||
proxy_pass http://frontend:3000;
|
||||
set $frontend_upstream http://frontend:3000;
|
||||
proxy_pass $frontend_upstream;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -80,7 +91,8 @@ server {
|
||||
|
||||
# ── Vite HMR WebSocket ────────────────────────────────────────────────────
|
||||
location /@vite/ {
|
||||
proxy_pass http://frontend:3000;
|
||||
set $frontend_upstream http://frontend:3000;
|
||||
proxy_pass $frontend_upstream;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
Reference in New Issue
Block a user