Open pvnovarese opened 4 years ago
Hi @pvnovarese,
First, sorry about the delay.
I will be happy to have a health check if you want to submit a PR. Elsewhere I could take a look at it in the next days.
Thank you
Adding such a healthcheck will only increase start time to one minute. This is because the first check fails and the next one is only one minute after. This is relevant for reverse proxies like traefik which remove routes when the container is not healthy.
Healthcheck added to docker-compose.yml so you can implement it that way.
Have you considered adding a simple healthcheck to the Dockerfile?
I think to do this you will need to change the base image from scratch to alpine, which will increase the resulting final image (on my system it more than tripled it), and I have an appreciation for keeping this as simple and minimal as possible. Also I am not super familiar with the ins and outs of exporters so I'm not really sure how much value a healthcheck will even add in this case.
The other possibility would be to add a built-in check function to the pihole-exporter itself, which might keep the bloat down a bit.
Anyway, all I did is change
and then add
I can submit a PR if you're interested in doing this.