An alternative to #68 that adds a pair of health check endpoints:
GET /api/health-checks/complete
GET /api/health-checks/minimal
The minimal endpoint just returns an OK response regardless of anything
else so it'll return 200 as long as the Go process is up. The complete
endpoint runs the additional check of pinging the database, verifying its
liveliness as well. This is useful because if the database is totally down
then River UI will be totally non-functional, but the minimal endpoint
would still return OK, and it's nice to have an alternative that'll return
an unhealthy status. Based on something I wrote about last year here [1].
An alternative to #68 that adds a pair of health check endpoints:
GET /api/health-checks/complete
GET /api/health-checks/minimal
The minimal endpoint just returns an OK response regardless of anything else so it'll return 200 as long as the Go process is up. The complete endpoint runs the additional check of pinging the database, verifying its liveliness as well. This is useful because if the database is totally down then River UI will be totally non-functional, but the minimal endpoint would still return OK, and it's nice to have an alternative that'll return an unhealthy status. Based on something I wrote about last year here [1].
Fixes #67.
[1] https://brandur.org/fragments/database-health-check