GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
73 lines
1.5 KiB
Markdown
73 lines
1.5 KiB
Markdown
# Healthcheck Contracts
|
|
|
|
## Doel
|
|
Elke runtime-component moet een eenvoudige en machineleesbare healthcheck hebben.
|
|
|
|
## Backend
|
|
|
|
### Liveness
|
|
|
|
`GET /health/live` returns HTTP 200 while the FastAPI process can serve a
|
|
request. It has no database or storage dependency.
|
|
|
|
### Readiness
|
|
|
|
`GET /health/ready` is the Docker healthcheck. `GET /health` is the
|
|
backward-compatible alias.
|
|
|
|
### Response 200
|
|
```json
|
|
{
|
|
"status": "ok",
|
|
"service": "geointel-backend",
|
|
"version": "1.0.0",
|
|
"database": "ok",
|
|
"postgis": "ok:3.x",
|
|
"migration": "ok:202607160001",
|
|
"storage": "ok",
|
|
"checks": {
|
|
"database": "ok",
|
|
"postgis": "ok:3.x",
|
|
"migration": "ok:202607160001",
|
|
"storage": "ok"
|
|
}
|
|
}
|
|
```
|
|
|
|
### Response 503
|
|
```json
|
|
{
|
|
"status": "degraded",
|
|
"service": "geointel-backend",
|
|
"database": "degraded",
|
|
"postgis": "degraded",
|
|
"migration": "degraded",
|
|
"storage": "ok"
|
|
}
|
|
```
|
|
|
|
## Worker
|
|
|
|
### Endpoint of command
|
|
Codex mag kiezen tussen een internal endpoint of CLI-command, maar het contract moet dit opleveren:
|
|
|
|
```json
|
|
{
|
|
"status": "ok",
|
|
"queue": "default",
|
|
"pending_jobs": 0,
|
|
"failed_jobs": 0,
|
|
"last_heartbeat": "ISO-8601"
|
|
}
|
|
```
|
|
|
|
## Frontend
|
|
Frontend moet een `/status` of settings/statuspanel hebben dat toont: backend bereikbaar, API version, auth status, feature flags en laatste healthchecktijd.
|
|
|
|
## Storage
|
|
De readinesscheck maakt en verwijdert een tijdelijk bestand in `STORAGE_ROOT`.
|
|
|
|
## Database
|
|
De readinesscheck controleert `SELECT 1`, `PostGIS_Version()` en dat de
|
|
databaseversie exact overeenkomt met de enige Alembic-head in de image.
|