Fix: change dashboard port to prevent clashing
CI / frontend (push) Canceled after 0s
CI / backend (push) Canceled after 1m44s

This commit is contained in:
2026-08-10 18:05:28 +08:00
parent 464160d7e2
commit d41aef0898
2 changed files with 14 additions and 5 deletions
+13 -4
View File
@@ -145,17 +145,26 @@ jobs:
run: |
ssh -i ~/.ssh/id_ed25519 \
"${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}" bash -euo pipefail <<'EOF'
cd /opt/vigilcare
set -a
# shellcheck disable=SC1091
. ./.env
set +a
API_PORT="${API_PORT:-5270}"
GATEWAY_PORT="${GATEWAY_PORT:-5081}"
DASHBOARD_PORT="${DASHBOARD_PORT:-8080}"
for i in $(seq 1 30); do
if curl -fsS http://localhost:5270/health/ready >/dev/null; then
if curl -fsS "http://localhost:${API_PORT}/health/ready" >/dev/null; then
echo "Ready check passed."
curl -fsS http://localhost:5081/health/live >/dev/null && echo "Gateway live."
curl -fsS http://localhost:8080/ >/dev/null && echo "Dashboard serving."
curl -fsS "http://localhost:${GATEWAY_PORT}/health/live" >/dev/null && echo "Gateway live."
curl -fsS "http://localhost:${DASHBOARD_PORT}/" >/dev/null && echo "Dashboard serving."
exit 0
fi
sleep 5
done
echo "Ready check never passed — dumping API logs:"
docker compose -f /opt/vigilcare/docker-compose.prod.yml --env-file /opt/vigilcare/.env logs --tail 100 api
docker compose -f docker-compose.prod.yml --env-file .env logs --tail 100 api
exit 1
EOF