---
version: "2.4"

volumes:

  grafana_data:
  prometheus_data:

services:

  prometheus:
    image: prom/prometheus:latest
    command:
      - --config.file=/etc/prometheus/prometheus.yml
    volumes:
      - ./hack/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
      - prometheus_data:/prometheus
    ports:
      - 9090:9090

  grafana:
    image: grafana/grafana
    environment:
      GF_SECURITY_ADMIN_USER: "test"
      GF_SECURITY_ADMIN_PASSWORD: "test"
    volumes:
      - ./hack/grafana/provisioning:/etc/grafana/provisioning
      - grafana_data:/var/lib/grafana
    ports:
      - 3000:3000
    links:
      - "prometheus"
