From 9aa22f092d298b34580eccd7a6d1db533c74d748 Mon Sep 17 00:00:00 2001 From: ttipo Date: Sat, 20 Jun 2026 20:11:40 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=B0=B1=EC=97=94=EB=93=9C=C2=B7?= =?UTF-8?q?=ED=94=84=EB=A1=A0=ED=8A=B8=20=ED=97=AC=EC=8A=A4=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=98=A4=ED=83=90=20=EC=88=98=EC=A0=95=20(?= =?UTF-8?q?=EB=9F=B0=ED=83=80=EC=9E=84=20=EC=A0=90=EA=B2=80=20=EB=B0=9C?= =?UTF-8?q?=EA=B2=AC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 백엔드: 앱이 전역 프리픽스 /api 하위라 루트(/) 프로브가 404 → /api/health 프로브로 교정 - 공통: localhost 가 IPv6(::1)로 풀려 IPv4 전용 바인딩에 연결 실패하던 것을 127.0.0.1 고정 - 두 컨테이너가 정상 동작에도 unhealthy 로 표시되던 선존 버그(리팩터 무관) Co-Authored-By: Claude Opus 4.8 (1M context) --- docker-compose.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 73f1bcd..e9abdb1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,7 +21,8 @@ services: depends_on: - backend healthcheck: - test: ["CMD-SHELL", "wget -qO- http://localhost:80/ || exit 1"] + # localhost 는 일부 이미지에서 IPv6(::1) 로 먼저 풀려 IPv4 전용 바인딩에 연결 실패 → 127.0.0.1 고정 + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:80/ || exit 1"] interval: 30s timeout: 5s retries: 5 @@ -68,7 +69,9 @@ services: redis: condition: service_healthy healthcheck: - test: ["CMD-SHELL", "wget -qO- http://localhost:${BACKEND_PORT}/ || exit 1"] + # API 는 전역 프리픽스 /api 하위에 마운트됨 — 루트(/)는 404 라 /api/health 를 프로브. + # localhost→IPv6(::1) 회피를 위해 127.0.0.1 고정. + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:${BACKEND_PORT}/api/health || exit 1"] interval: 30s timeout: 5s retries: 5