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