fix(deploy): use correct PORT for health check (was hardcoded to 3000, env uses 3002)

The health check URL was hardcoded to http://127.0.0.1:3000 but the
production .env sets PORT=3002. Read the PORT from .env dynamically
so the health check matches the actual server port.
This commit is contained in:
openhands committed 2026-07-28 23:00:19 +02:00
1 parent 3b853efba0
commit 22a9fc13f7
1 file changed
+3 -2
+3 -2
View File
@@ -389,8 +389,9 @@ jobs:
exit 1
fi
echo "Waiting for HTTP health check..."
HEALTH_URL="${DEPLOY_HEALTH_URL:-http://127.0.0.1:3000/api/health}"
DEPLOY_PORT="$(grep -E '^[[:space:]]*PORT=.+' "${LIVE}/.env" 2>/dev/null | cut -d= -f2 | tr -d '"' || echo '3002')"
echo "Waiting for HTTP health check on port ${DEPLOY_PORT}..."
HEALTH_URL="${DEPLOY_HEALTH_URL:-http://127.0.0.1:${DEPLOY_PORT}/api/health}"
HEALTH_OK=0
for i in $(seq 1 15); do
BODY="$(curl -sf --max-time 5 "${HEALTH_URL}" 2>/dev/null || true)"