docker-compose.yml 629 B

12345678910111213141516171819202122232425262728
  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. restart:
  11. - unless-stopped
  12. volumes:
  13. - ./prometheus:/etc/prometheus
  14. - prom_data:/prometheus
  15. grafana:
  16. image: grafana/grafana
  17. container_name: grafana
  18. ports:
  19. - 3000:3000
  20. restart:
  21. - unless-stopped
  22. environment:
  23. - GF_SECURITY_ADMIN_USER=admin
  24. - GF_SECURITY_ADMIN_PASSWORD=grafana
  25. volumes:
  26. - ./grafana:/etc/grafana/provisioning/datasources
  27. volumes:
  28. prom_data: