Skip to content

Commit 609c719

Browse files
committed
fix: replace docker inspect with docker exec health probe in deploy verification
1 parent f1b89e5 commit 609c719

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ jobs:
140140
DEPLOY_COLOR=$(ssh $SSH_OPTS "$VPS_HOST" "cat /opt/rustyip/.active_color")
141141
echo "Active deployment color: ${DEPLOY_COLOR}"
142142
for i in $(seq 1 30); do
143-
status=$(ssh $SSH_OPTS "$VPS_HOST" \
144-
"docker inspect --format {{ '{{' }}.State.Health.Status{{ '}}' }} rustyip-app-${DEPLOY_COLOR}" 2>/dev/null) || true
145-
if [ "$status" = "healthy" ]; then
143+
if ssh $SSH_OPTS "$VPS_HOST" \
144+
"docker exec rustyip-app-${DEPLOY_COLOR} wget -qO /dev/null http://127.0.0.1:3000/health" 2>/dev/null; then
146145
echo "Deployment verified: app-${DEPLOY_COLOR} is healthy"
147146
exit 0
148147
fi

0 commit comments

Comments
 (0)