docker-compose.yml 617 B

1234567891011121314151617181920212223242526272829
  1. version: '3'
  2. volumes:
  3. prometheus-data:
  4. driver: local
  5. grafana-data:
  6. driver: local
  7. services:
  8. prometheus:
  9. image: prom/prometheus:latest
  10. container_name: prometheus
  11. ports:
  12. - "9090:9090"
  13. volumes:
  14. - /etc/prometheus:/etc/prometheus
  15. - prometheus-data:/prometheus
  16. restart: unless-stopped
  17. command:
  18. - "--config.file=/etc/prometheus/prometheus.yml"
  19. grafana:
  20. image: grafana/grafana-oss:latest
  21. container_name: grafana
  22. ports:
  23. - "3000:3000"
  24. volumes:
  25. - grafana-data:/var/lib/grafana
  26. restart: unless-stopped