From 54af71346de2d43da97ff39347f39c15a3fc46c8 Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Tue, 6 Oct 2026 17:01:31 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=B0=B1=EC=97=94=EB=93=9C=EA=B0=80=20?= =?UTF-8?q?=EB=8B=A4=EC=8B=9C=20=EB=96=A0=EB=8F=84=20=ED=94=84=EB=A1=A0?= =?UTF-8?q?=ED=8A=B8=20nginx=20=EA=B0=80=20=EC=83=88=20=EC=A3=BC=EC=86=8C?= =?UTF-8?q?=EB=A1=9C=20API=20=EB=A5=BC=20=EB=84=98=EA=B8=B0=EA=B2=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/nginx.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/nginx.conf b/frontend/nginx.conf index b3db35d..fbf100e 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -22,7 +22,10 @@ server { # API 는 같은 주소로 받아 backend 컨테이너로 넘긴다 location /v1/ { - proxy_pass http://backend:9800; + # 백엔드 컨테이너가 다시 뜨면 IP 가 바뀌므로 docker DNS 로 매번 다시 찾는다 + resolver 127.0.0.11 valid=10s ipv6=off; + set $api http://backend:9800; + proxy_pass $api; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;