Grafana Loki docker health check

Just adding some more intelligence into docker-compose.yaml file for checking the status of that wonderful Grafana Loki service:

version: "3"

services:
  loki:
    image: grafana/loki:2.4.1
    restart: always
    ports:
      - "127.0.0.1:3100:3100"
    command: -config.file=/etc/loki/local-config.yaml
    volumes:
      - ./loki-config.yaml:/etc/loki/local-config.yaml:ro
      - ./data:/data
    healthcheck:
      test: wget -q --tries=1 -O- http://127.0.0.1:3100/ready|grep -q "ready"
      interval: 30s
      timeout: 5s
      retries: 3

Now I get an even better output:

loki@logger:~$ docker-compose ps
   Name                  Command                  State                Ports
--------------------------------------------------------------------------------------
loki_loki_1   /usr/bin/loki -config.file ...   Up (healthy)   127.0.0.1:3100->3100/tcp