Skip to main content

Self-host preflight

Before starting the first assessment on a new or changed deployment, run the API preflight diagnostic. It checks dependencies that the normal readiness probe does not gate: S3/MinIO, Flagship/flagd, runner gRPC, Polar billing when configured, and required API secrets.

docker compose run --rm api aisafe-api preflight

The command prints one line per check:

  • PASS means the dependency responded correctly.
  • FAIL means the deployment needs attention before running assessments.
  • SKIP means the dependency is optional or checked by another service.

The process exits 0 only when every required check passes. Use that exit code as a deploy gate in CI or automation.

Admins can fetch the same report from the API:

curl -H "Authorization: Bearer <token>" \
https://api.example.com/api/v1/health/diagnostics

The endpoint returns 200 when the report is green and 503 when any required check fails. It is separate from /health/ready; readiness remains focused on MongoDB and Redis so optional-service outages do not remove an otherwise serving API from rotation.