From 609c71920bb2d54e87ed8ce7a1ef3263c690132e Mon Sep 17 00:00:00 2001 From: NetworkCats Date: Sun, 8 Mar 2026 01:44:05 +0800 Subject: [PATCH] fix: replace docker inspect with docker exec health probe in deploy verification --- .github/workflows/deploy.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index eddb82f..c8762ee 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -140,9 +140,8 @@ jobs: DEPLOY_COLOR=$(ssh $SSH_OPTS "$VPS_HOST" "cat /opt/rustyip/.active_color") echo "Active deployment color: ${DEPLOY_COLOR}" for i in $(seq 1 30); do - status=$(ssh $SSH_OPTS "$VPS_HOST" \ - "docker inspect --format {{ '{{' }}.State.Health.Status{{ '}}' }} rustyip-app-${DEPLOY_COLOR}" 2>/dev/null) || true - if [ "$status" = "healthy" ]; then + if ssh $SSH_OPTS "$VPS_HOST" \ + "docker exec rustyip-app-${DEPLOY_COLOR} wget -qO /dev/null http://127.0.0.1:3000/health" 2>/dev/null; then echo "Deployment verified: app-${DEPLOY_COLOR} is healthy" exit 0 fi