# Prometheus + Grafana for live loadr dashboards.
#   docker compose up -d   then run: loadr run loadr.yaml
# Prometheus scrapes loadr on the host at :9091 (see prometheus.yml).
services:
  prometheus:
    image: prom/prometheus:latest
    ports: ["9090:9090"]
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
    extra_hosts:
      - "host.docker.internal:host-gateway"   # reach loadr running on the host

  grafana:
    image: grafana/grafana:latest
    ports: ["3000:3000"]
    environment:
      GF_AUTH_ANONYMOUS_ENABLED: "true"
      GF_AUTH_ANONYMOUS_ORG_ROLE: Admin
      GF_SECURITY_ADMIN_PASSWORD: admin
    depends_on: [prometheus]
