This service generates a Gatus configuration from ArangoDB data and serves uptime monitoring at uptime.tracker.canada.ca.
- Queries ArangoDB for domains with
highAvailability == true - Builds a Gatus
config.yamlwith endpoint checks and alerting - Runs Gatus with the generated configuration
sync-gatus-config.py: Fetches domains and writes Gatus configDockerfile: Image for the sync/init processdocker-compose.local.yaml: Local test stack (init sync + Gatus).env.example: Environment variable template
Copy .env.example to .env and fill values:
ARANGO_URLARANGO_DATABASEARANGO_USERNAMEARANGO_PASSWORDNOTIFICATION_API_KEYNOTIFICATION_API_URLSERVICE_ACCOUNT_EMAILNOTIFICATION_UPTIME_ALERT_ID
Notes:
GATUS_CONFIG_PATHis set by Compose to/config/config.yaml.- Do not use
localhostforARANGO_URLin.envwhen running Compose. Insidesync-init,localhostpoints to the container itself. - For a DB running on your host machine, use
ARANGO_URL=http://host.docker.internal:8529. - If ArangoDB is another Compose service, use its service name (for example
ARANGO_URL=http://arangodb:8529).
From this directory (services/uptime):
docker compose -f docker-compose.local.yaml up --buildOpen:
http://localhost:8080/uptime
The sync-init service emulates the Kubernetes init container:
- Runs
python /app/sync-gatus-config.py
Then gatus starts only after sync-init completes successfully and mounts:
/config(generated config)
Render merged compose config:
docker compose -f docker-compose.local.yaml configStart in background:
docker compose -f docker-compose.local.yaml up --build -dStop and remove containers:
docker compose -f docker-compose.local.yaml downRemove containers and volumes (fresh state):
docker compose -f docker-compose.local.yaml down -v- If
sync-initexits immediately, inspect logs:
docker compose -f docker-compose.local.yaml logs sync-init- If Gatus starts but shows no endpoints, check ArangoDB connectivity and credentials in
.env.