docker-telegram-bot-api
docker-telegram-bot-api copied to clipboard
change healthcheck to 127.0.0.1
Hey,
I've been using this container quite successfully for months now, however using network_mode: host seems to make my health check fail, marking it as unhealthy. This is probably due to the extra step of resolving localhost to 127.0.0.1.
I couldn't build the image locally, but from my testing (attaching to /bin/sh inside the container) it achieves the desired result more reliably.
EDIT: As a workaround you can override the healthcheck without rebuilding the image:
healthcheck:
test: ["CMD-SHELL", "nc -z 127.0.0.1 8081 || exit 1"]
interval: 5s
timeout: 30s
retries: 3