What is the proper healthcheck
for Loki in a docker-compose.yml
file?
I tried the one below but it does not work.
services
loki:
image: grafana/loki:2.9.5
container_name: loki
restart: unless-stopped
command: -config.file=/etc/loki/config.yaml
ports:
- 3100:3100 # http
- 9096:9096 # grpc
volumes:
- ./loki/config.yaml:/etc/loki/config.yaml:ro
- ./.loki:/tmp/loki
networks:
- database
healthcheck:
test: curl --fail http://localhost:3100/ready || exit 1
start_period: 20s
interval: 10s
timeout: 1s
retries: 18 # trying for 3 minutes