Add JSON health check with database and tablebase status (#106)

This commit is contained in:
2026-11-09 22:24:09 +01:00
parent 4c39f231f1
commit 56d51347b9
4 changed files with 135 additions and 3 deletions
+4
View File
@@ -377,6 +377,10 @@ sudo journalctl -u chesstrainer -n 100 --no-pager
curl -i http://127.0.0.1:4100/health
```
`/health` returns JSON with `status`, `db`, `tablebase`, and `process`.
It returns 200 for `ok`/`degraded` and 503 for `down`. A missing local tablebase
reports `degraded` but still 200 because Lichess fallback is available.
## Backups
Take a logical backup of the production database: