dokku / docker-container-healthchecker

Runs healthchecks against local docker containers
BSD 3-Clause "New" or "Revised" License
16 stars 4 forks source link

Fetch healthcheck configuration via container label #44

Open josegonzalez opened 1 year ago

josegonzalez commented 1 year ago

Description of feature

We should be able to fetch healthcheck config from docker labels in addition to a config.

To use labels, the flag --label-config must be passed (otherwise we default to using app.json).

Each label can have a configurable label prefix, default of healthchecks.dokku.com/. As we can have 1 or more healthchecks, each healthcheck is numbered, 0-indexed, with keys being the same as in the json file.

Example:

healthchecks.dokku.com/0.attempts: 1
healthchecks.dokku.com/0.command: ["command", "here"]
healthchecks.dokku.com/1.command: ["command", "here"]

All label values should be json-encoded.