tooling/scripts/health-check.sh
2026-01-08 09:14:00 +00:00

21 lines
473 B
Bash
Executable file

#!/bin/bash
# Check all production service health endpoints
set -euo pipefail
SERVICES=(
"http://app.nexus.local/health"
"http://api.nexus.local/health"
"http://auth.nexus.local/health"
)
EXIT=0
for URL in "${SERVICES[@]}"; do
HTTP=$(curl -sf -o /dev/null -w "%{http_code}" "$URL" 2>/dev/null || echo "000")
if [ "$HTTP" = "200" ]; then
echo "[ok] $URL"
else
echo "[fail] $URL (HTTP $HTTP)"
EXIT=1
fi
done
exit $EXIT