Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/dev-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,11 @@ jobs:
docker compose -p "${CONTAINER_BASE}-${NEW_SLOT}" -f docker-compose.dev.yml up -d solid-connection-dev

# 8. 헬스 체크 (앱 기동 대기, 최대 150초)
# HTTP 200 = UP, 503 = DOWN (single-quote 내부 quoting 문제 없이 상태코드로 판단)
echo "Waiting for app on management port ${MANAGEMENT_PORT}..."
for i in $(seq 1 30); do
STATUS=$(curl -s --connect-timeout 2 "http://localhost:${MANAGEMENT_PORT}/actuator/health" | grep -o '"status":"UP"' || true)
[ "$STATUS" = '"status":"UP"' ] && { echo "App healthy (attempt ${i})"; break; }
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 2 "http://localhost:${MANAGEMENT_PORT}/actuator/health" || true)
[ "$HTTP_CODE" = "200" ] && { echo "App healthy (attempt ${i})"; break; }
[ "$i" = "30" ] && {
echo "Health check timed out after 150s" >&2
docker stop "${CONTAINER_BASE}-${NEW_SLOT}" 2>/dev/null || true
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/prod-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,11 @@ jobs:
docker compose -p "${CONTAINER_BASE}-${NEW_SLOT}" -f docker-compose.prod.yml up -d solid-connection-server

# 6. 헬스 체크 (앱 기동 대기, 최대 150초)
# HTTP 200 = UP, 503 = DOWN (single-quote 내부 quoting 문제 없이 상태코드로 판단)
echo "Waiting for app on management port ${MANAGEMENT_PORT}..."
for i in $(seq 1 30); do
STATUS=$(curl -s --connect-timeout 2 "http://localhost:${MANAGEMENT_PORT}/actuator/health" | grep -o '"status":"UP"' || true)
[ "$STATUS" = '"status":"UP"' ] && { echo "App healthy (attempt ${i})"; break; }
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 2 "http://localhost:${MANAGEMENT_PORT}/actuator/health" || true)
[ "$HTTP_CODE" = "200" ] && { echo "App healthy (attempt ${i})"; break; }
[ "$i" = "30" ] && {
echo "Health check timed out after 150s" >&2
docker stop "${CONTAINER_BASE}-${NEW_SLOT}" 2>/dev/null || true
Expand Down
Loading