I’m trying to set up a simple docker healthcheck for Grafana. Grafana is exposed on host port 3001.
I would expect this to work (as written in docker-compose file)
healthcheck:
test: curl --fail -s http://localhost:3001/ || exit 1
interval: 10min
timeout: 10s
retries: 3
But I always get result “unhealthy” as container status.
If I enter the same command curl --fail -s http://localhost:3001/
on my local machine (e.g. in Postman) I see get a Status 200 OK.
Any idea what I’m doing wrong?
Any other ideas how to set up a basic health check for Grafana running in a docker container?