This commit is contained in:
2026-10-30 10:59:34 +03:00
parent ec540a1a72
commit c8001b7839
20 changed files with 1314 additions and 11 deletions
+22
View File
@@ -0,0 +1,22 @@
upstream api_backend {
# Nginx будет автоматически резолвить имена через Docker DNS
server api:8080 max_fails=1 fail_timeout=5s;
}
server {
listen 8080;
# Проксирование ВСЕХ запросов на API реплики
location / {
proxy_pass http://api_backend;
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-Request-Id $http_x_request_id;
# Таймауты для graceful shutdown
proxy_connect_timeout 5s;
proxy_read_timeout 30s;
proxy_send_timeout 30s;
}
}