Health checks and the job runner
Health checks
GET /health returns the server's status, version and name. Both Docker images have a built-in health check that calls it. On the runner, it's only served inside the container, so don't publish its port.
The scheduled job runner
Run exactly one runner per installation, with the same database, picture bucket and map settings as the backend. It runs:
- Account deletion, every minute. Deletes accounts whose 7-day grace period has ended, removes their pictures and retries clean-up that failed earlier. With email on, it emails the owner once the account is gone.
- Verification clean-up, every hour. Deletes expired email codes and verification tokens.
- Device clean-up, every hour. Deletes phones that weren't set up within 7 days of signing in, and their sign-ins, and phones removed before they were set up once 7 days have passed. It also deletes device link records a day after their code expired, and expired device checks.
Each job runs once at startup, then waits its interval after each run. Failed runs are logged and retried. Restarting the runner runs every job again, and missed runs aren't caught up.
At startup the runner checks PostgreSQL, picture storage, the map file and, if configured, your email provider, and exits if any check fails.