diff --git a/deploy/qa/docker-compose.qa.yml b/deploy/qa/docker-compose.qa.yml index b14a5ff..8054b3b 100644 --- a/deploy/qa/docker-compose.qa.yml +++ b/deploy/qa/docker-compose.qa.yml @@ -36,7 +36,7 @@ services: db: condition: service_healthy healthcheck: - test: ["CMD-SHELL", "curl -fsS http://localhost:8080/api/v1/health || exit 1"] + test: ["CMD-SHELL", "curl -fsS http://localhost:8080/health || exit 1"] interval: 10s timeout: 5s retries: 5 diff --git a/scripts/ci/deploy-qa.sh b/scripts/ci/deploy-qa.sh index cd62263..fdc7379 100755 --- a/scripts/ci/deploy-qa.sh +++ b/scripts/ci/deploy-qa.sh @@ -26,7 +26,7 @@ $COMPOSE up -d log "Waiting for API health check via admin proxy on port $QA_ADMIN_PORT" attempts=30 -until curl -fsS "http://localhost:${QA_ADMIN_PORT}/api/v1/health" >/dev/null 2>&1; do +until curl -fsS "http://localhost:${QA_ADMIN_PORT}/health" >/dev/null 2>&1; do attempts=$((attempts - 1)) if [[ "$attempts" -le 0 ]]; then fail "QA stack did not become healthy in time" diff --git a/src/admin/nginx.conf b/src/admin/nginx.conf index a3f6802..7feb6f8 100755 --- a/src/admin/nginx.conf +++ b/src/admin/nginx.conf @@ -20,6 +20,14 @@ server { proxy_read_timeout 30s; } + # Proxy the API's health endpoint, which lives outside the /api prefix. + location = /health { + resolver 127.0.0.11 valid=10s ipv6=off; + set $api_upstream http://api:8080; + proxy_pass $api_upstream/health; + proxy_http_version 1.1; + } + # SPA fallback — all other paths serve index.html so Vue Router handles them location / { try_files $uri $uri/ /index.html;