README: move healthcheck into docker-compose section

This commit is contained in:
Guilhem Saurel 2023-04-08 14:58:53 +02:00
parent f1de3ad1dc
commit 49ced24f84

View File

@ -56,26 +56,6 @@ options:
-v, --verbose increment verbosity level
```
### Healthcheck
For load balancers which require a healthcheck endpoint to validate the availability of the service, the `/health` path can be used. The endpoint will return a **HTTP 200** status and a json document.
Using the Healthcheck endpoint with Traefik and docker-compose:
```yaml
version: '3'
...
services:
bot:
...
labels:
traefik.enable: "true"
traefik.http.routers.matrix-webhook.rule: "Host(`${CHATONS_SERVICE:-matrixwebhook}.${CHATONS_DOMAIN:-localhost}`)"
traefik.http.services.matrix-webhook.loadbalancer.healthcheck.path: /health
```
## Dev
```
@ -97,6 +77,20 @@ A `docker-compose.yml` is provided:
docker-compose up -d
```
### Healthcheck
For load balancers which require a healthcheck endpoint to validate the availability of the service, the `/health` path can be used.
The endpoint will return a **HTTP 200** status and a json document.
To the Healthcheck endpoint with Traefik and docker-compose, you can add:
```yaml
services:
bot:
labels:
traefik.http.services.matrix-webhook.loadbalancer.healthcheck.path: /health
```
## Test / Usage
```