Files
ai-tax-agent/scripts/verify-infra.sh
harkon b324ff09ef
Some checks failed
CI/CD Pipeline / Code Quality & Linting (push) Has been cancelled
CI/CD Pipeline / Policy Validation (push) Has been cancelled
CI/CD Pipeline / Test Suite (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-coverage) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-extract) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-firm-connectors) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-forms) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-hmrc) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-ingestion) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-kg) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-normalize-map) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-ocr) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rag-indexer) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rag-retriever) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-reason) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (svc-rpa) (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (ui-review) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-coverage) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-extract) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-kg) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (svc-rag-retriever) (push) Has been cancelled
CI/CD Pipeline / Security Scanning (ui-review) (push) Has been cancelled
CI/CD Pipeline / Generate SBOM (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Notifications (push) Has been cancelled
Initial commit
2025-10-11 08:41:36 +01:00

45 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
COMPOSE_DIR="$ROOT_DIR/infra/compose"
get_env() {
local key="$1"; local def="${2-}"
local line
line=$(grep -E "^${key}=" "$COMPOSE_DIR/.env" | tail -n1 || true)
if [[ -z "$line" ]]; then printf "%s" "$def"; return; fi
printf "%s" "${line#*=}"
}
DOMAIN=${DOMAIN:-$(get_env DOMAIN local)}
echo "🔎 Verifying core infra endpoints for domain: $DOMAIN..."
check() {
local name="$1" url="$2"
code=$(curl -ks -o /dev/null -w '%{http_code}' "$url" || true)
if [[ "$code" == "200" || "$code" == "302" || "$code" == "401" ]]; then
echo "$name ($url) -> $code"
else
echo "$name ($url) -> $code"; return 1
fi
}
ok=true
check Traefik "http://localhost:8080/ping" || ok=false
check Authentik "https://auth.${DOMAIN}/if/flow/default-authentication-flow/" || ok=false
check Grafana "https://grafana.${DOMAIN}" || ok=false
check Unleash "https://unleash.${DOMAIN}" || ok=false
check Neo4j "https://neo4j.${DOMAIN}" || ok=false
check Qdrant "https://qdrant.${DOMAIN}/health" || ok=false
check Vault "https://vault.${DOMAIN}/v1/sys/health" || ok=false
check Minio "https://minio.${DOMAIN}" || ok=false
if [[ "$ok" == true ]]; then
echo "🎉 Infra endpoints reachable"
else
echo "⚠️ Some checks failed. Use 'make logs' or 'make logs-service SERVICE=name'"
exit 1
fi