docker-compose/42-compose-monitoring-stack/docker-compose.yml

services:
  prometheus:
    image: prom/prometheus
    ports: ["9090:9090"]
    volumes: ["./prometheus.yml:/etc/prometheus/prometheus.yml:ro"]
  grafana:
    image: grafana/grafana
    ports: ["3000:3000"]
    volumes: ["grafana_data:/var/lib/grafana"]
  node-exporter:
    image: prom/node-exporter
    ports: ["9100:9100"]
volumes:
  grafana_data: