services:
  node-exporter:
    image: prom/node-exporter
    expose: ["9100"]
    command:
      - '--path.procfs=/host/proc'
      - '--path.rootfs=/rootfs'
      - '--path.sysfs=/host/sys'
      - '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
    volumes:
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /:/rootfs:ro
  prometheus:
    image: prom/prometheus
    expose: ["9090"]
    volumes:
      - ./etc/prometheus:/etc/prometheus
      - prometheus_data:/prometheus
  grafana:
    image: grafana/grafana-oss
    ports: ["3000:3000"]
    volumes:
      - grafana_data:/var/lib/grafana
volumes:
  prometheus_data:
  grafana_data: