Add MariaDB HTTP readiness service

This commit is contained in:
Repinoid
2026-10-02 11:48:13 +03:00
commit 01ad74acd6
7 changed files with 155 additions and 0 deletions
+16
View File
@@ -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 .
```