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:
PASSmeans the dependency responded correctly.FAILmeans the deployment needs attention before running assessments.SKIPmeans 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.
Organization administrators can also read named check results at
GET /health/diagnostics through an authorized session. That response uses
generic status descriptions. Run the command inside the deployment to see
dependency details.
Host and container monitoring
The compose stack ships two exporters as ordinary containers with read-only
access to the host: node_exporter (host memory, memory pressure, CPU, disks
and kernel OOM kills) and cAdvisor (each container's memory, memory limit,
CPU, restarts and OOM kills). The bundled Prometheus scrapes them and alerts
when the host runs low on memory or disk or a container keeps hitting its
memory limit. Both serve standard Prometheus metrics on the stack's internal
network (node-exporter:9100 and cadvisor:8080), so your own monitoring can
scrape them too.
Every service in the stack has a memory limit, so a service that grows out of bounds is restarted on its own instead of exhausting the host. Give the host at least the memory the stack was sized for (32 GB) and keep the limits in the compose file unless you have measured that a service needs more.