docker-compose.yaml 537 B

12345678910111213141516171819
  1. # docker-compose.yaml
  2. version: "3"
  3. services:
  4. prometheus:
  5. image: prom/prometheus:latest
  6. extra_hosts:
  7. - "host.docker.internal:host-gateway" # allow a direct connection from container to the local machine
  8. ports:
  9. - "9090:9090" # the default port used by Prometheus
  10. volumes:
  11. - ./prometheus.yaml:/etc/prometheus/prometheus.yml # mount Prometheus config file
  12. grafana:
  13. image: grafana/grafana:latest
  14. depends_on:
  15. - prometheus
  16. ports:
  17. - "3000:3000" # the default port used by Grafana