fix: resolver DNS nginx pour éviter cache IP stale après restart backend

This commit is contained in:
deploy
2026-04-30 21:14:27 +00:00
parent a1e7aa46d5
commit 018fb1d70f
57 changed files with 7 additions and 7579 deletions
+7 -9
View File
@@ -5,6 +5,10 @@ server {
root /usr/share/nginx/html;
index index.html;
# Résolveur Docker interne — re-résolution DNS à chaque requête (évite le cache IP stale)
resolver 127.0.0.11 valid=30s ipv6=off;
resolver_timeout 5s;
# ── Compression ───────────────────────────────────────────
gzip on;
gzip_vary on;
@@ -22,7 +26,8 @@ server {
# ── API → backend (service Docker interne) ────────────────
location /api/ {
proxy_pass http://notesfrais-backend:3001/api/;
set $upstream_backend http://notesfrais-backend:3001;
proxy_pass $upstream_backend/api/;
proxy_http_version 1.1;
proxy_set_header Host $host;
@@ -34,11 +39,4 @@ server {
client_max_body_size 20m;
# Timeout généreux pour la génération PDF
proxy_read_timeout 120s;
}
# ── SPA fallback (React Router) ───────────────────────────
location / {
try_files $uri $uri/ /index.html;
}
}
pr