Fix: change dashboard port to prevent clashing
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ IMAGE_TAG=v1.0.0
|
|||||||
# ---- exposed ports on the production host ----
|
# ---- exposed ports on the production host ----
|
||||||
API_PORT=5270
|
API_PORT=5270
|
||||||
GATEWAY_PORT=5081
|
GATEWAY_PORT=5081
|
||||||
DASHBOARD_PORT=8080
|
DASHBOARD_PORT=8088
|
||||||
DASHBOARD_ORIGIN=https://vigilcare.example.com
|
DASHBOARD_ORIGIN=https://vigilcare.example.com
|
||||||
|
|
||||||
# ---- external PostgreSQL ----
|
# ---- external PostgreSQL ----
|
||||||
|
|||||||
+13
-4
@@ -145,17 +145,26 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
ssh -i ~/.ssh/id_ed25519 \
|
ssh -i ~/.ssh/id_ed25519 \
|
||||||
"${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}" bash -euo pipefail <<'EOF'
|
"${{ 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
|
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."
|
echo "Ready check passed."
|
||||||
curl -fsS http://localhost:5081/health/live >/dev/null && echo "Gateway live."
|
curl -fsS "http://localhost:${GATEWAY_PORT}/health/live" >/dev/null && echo "Gateway live."
|
||||||
curl -fsS http://localhost:8080/ >/dev/null && echo "Dashboard serving."
|
curl -fsS "http://localhost:${DASHBOARD_PORT}/" >/dev/null && echo "Dashboard serving."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
echo "Ready check never passed — dumping API logs:"
|
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
|
exit 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user