From a5a9337838b85996e29b9badb07175a7c19ca371 Mon Sep 17 00:00:00 2001 From: gahusb Date: Mon, 27 Apr 2026 14:56:21 +0900 Subject: [PATCH] =?UTF-8?q?fix(nginx):=20portfolio=20=ED=94=84=EB=A1=9D?= =?UTF-8?q?=EC=8B=9C=EB=A5=BC=20=EB=B3=80=EC=88=98=20=EA=B8=B0=EB=B0=98?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 직접 proxy_pass로 portfolio:8000 참조 시 컨테이너 미실행 상태에서 nginx DNS 해석 실패 → 재시작 루프 발생. resolver + 변수 패턴 적용. Co-Authored-By: Claude Opus 4.6 (1M context) --- nginx/default.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nginx/default.conf b/nginx/default.conf index 2275de4..1e7a0b7 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -142,12 +142,15 @@ server { # profile API (Portfolio Service) location /api/profile/ { + resolver 127.0.0.11 valid=10s; + set $portfolio_backend portfolio:8000; + 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; - proxy_pass http://portfolio:8000/api/profile/; + proxy_pass http://$portfolio_backend$request_uri; } # agent-office API + WebSocket