docker-compose.yml 557 B

123456789101112131415161718192021222324
  1. version: "3.7"
  2. services:
  3. prometheus:
  4. image: prom/prometheus
  5. container_name: prometheus
  6. command:
  7. - '--config.file=/etc/prometheus/prometheus.yml'
  8. ports:
  9. - 9090:9090
  10. volumes:
  11. - ./prometheus:/etc/prometheus
  12. - prom_data:/prometheus
  13. grafana:
  14. image: grafana/grafana
  15. container_name: grafana
  16. ports:
  17. - 3000:3000
  18. environment:
  19. - GF_SECURITY_ADMIN_USER=admin
  20. - GF_SECURITY_ADMIN_PASSWORD=grafana
  21. volumes:
  22. - ./grafana:/etc/grafana/provisioning/datasources
  23. volumes:
  24. prom_data: