File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,10 +153,11 @@ jobs:
153153 docker compose -p "${CONTAINER_BASE}-${NEW_SLOT}" -f docker-compose.dev.yml up -d solid-connection-dev
154154
155155 # 8. 헬스 체크 (앱 기동 대기, 최대 150초)
156+ # HTTP 200 = UP, 503 = DOWN (single-quote 내부 quoting 문제 없이 상태코드로 판단)
156157 echo "Waiting for app on management port ${MANAGEMENT_PORT}..."
157158 for i in $(seq 1 30); do
158- STATUS =$(curl -s -- connect-timeout 2 "http://localhost:${MANAGEMENT_PORT}/actuator/health" | grep -o '"status":"UP"' || true)
159- [ "$STATUS " = '"status":"UP"' ] && { echo "App healthy (attempt ${i})"; break; }
159+ HTTP_CODE =$(curl -s -o /dev/null -w "%{http_code}" -- connect-timeout 2 "http://localhost:${MANAGEMENT_PORT}/actuator/health" || true)
160+ [ "$HTTP_CODE " = "200" ] && { echo "App healthy (attempt ${i})"; break; }
160161 [ "$i" = "30" ] && {
161162 echo "Health check timed out after 150s" >&2
162163 docker stop "${CONTAINER_BASE}-${NEW_SLOT}" 2>/dev/null || true
Original file line number Diff line number Diff line change @@ -164,10 +164,11 @@ jobs:
164164 docker compose -p "${CONTAINER_BASE}-${NEW_SLOT}" -f docker-compose.prod.yml up -d solid-connection-server
165165
166166 # 6. 헬스 체크 (앱 기동 대기, 최대 150초)
167+ # HTTP 200 = UP, 503 = DOWN (single-quote 내부 quoting 문제 없이 상태코드로 판단)
167168 echo "Waiting for app on management port ${MANAGEMENT_PORT}..."
168169 for i in $(seq 1 30); do
169- STATUS =$(curl -s -- connect-timeout 2 "http://localhost:${MANAGEMENT_PORT}/actuator/health" | grep -o '"status":"UP"' || true)
170- [ "$STATUS " = '"status":"UP"' ] && { echo "App healthy (attempt ${i})"; break; }
170+ HTTP_CODE =$(curl -s -o /dev/null -w "%{http_code}" -- connect-timeout 2 "http://localhost:${MANAGEMENT_PORT}/actuator/health" || true)
171+ [ "$HTTP_CODE " = "200" ] && { echo "App healthy (attempt ${i})"; break; }
171172 [ "$i" = "30" ] && {
172173 echo "Health check timed out after 150s" >&2
173174 docker stop "${CONTAINER_BASE}-${NEW_SLOT}" 2>/dev/null || true
You can’t perform that action at this time.
0 commit comments