ЛР3 — БВТ2302 — Никитина — на 5

This commit is contained in:
Yuliiiaaaa
2026-11-03 12:37:56 +03:00
parent 0ab3a341aa
commit dacbdd8b29
21 changed files with 1138 additions and 48 deletions
+25
View File
@@ -0,0 +1,25 @@
worker_processes 1;
events { worker_connections 1024; }
http {
# Используем встроенный DNS Docker для динамического разрешения имен
resolver 127.0.0.11 valid=5s;
server {
listen 8080;
location / {
# Переменная заставляет Nginx перепроверять IP контейнеров
set $backend "http://api:8080";
proxy_pass $backend;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
# Таймауты для быстрого отсечения упавших реплик
proxy_connect_timeout 2s;
proxy_next_upstream error timeout http_502 http_503 http_504;
}
}
}