Add MariaDB HTTP readiness service
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# MariaDB HTTP Check
|
||||
|
||||
Small HTTP service for checking MariaDB connectivity from the Nubes HTTP runtime.
|
||||
|
||||
Configuration is read from `DB_HOST`, `DB_PORT`, `DB_NAME`, `DB_USER`, and `DB_PASSWORD`.
|
||||
The default listening port is `8080`; it can be changed with `PORT`.
|
||||
|
||||
- `GET /healthz` checks that the process is serving requests.
|
||||
- `GET /readyz` checks MariaDB with `SELECT 1` and returns `503` while the database is unavailable.
|
||||
- `GET /` returns the same readiness status as `/readyz`.
|
||||
|
||||
Build the container image with:
|
||||
|
||||
```sh
|
||||
docker build -t naeel/mariadb-check:0.1 .
|
||||
```
|
||||
Reference in New Issue
Block a user