Fix health check path mismatch causing 404s
Some checks failed
CI / build-and-push (push) Successful in 45s
CI / deploy-qa (push) Failing after 1m8s

The app maps health checks at /health (ServiceDefaults), not /api/v1/health.
Compose healthcheck and deploy-qa.sh's wait-loop both hit the wrong path.
Also add an nginx location for /health since it lives outside the /api
prefix that the admin proxy otherwise forwards unchanged.
This commit is contained in:
2026-07-04 13:15:09 -07:00
parent 8d0cef08b1
commit b32f5d56db
3 changed files with 10 additions and 2 deletions

View File

@@ -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

View File

@@ -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"

View File

@@ -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;