docker-compose-monitor.yml 786 B

123456789101112131415161718192021222324252627282930
  1. version: "2"
  2. services:
  3. prometheus:
  4. image: prom/prometheus:v2.1.0
  5. volumes:
  6. - ./monitor/prometheus/:/etc/prometheus/
  7. - ./monitor/prometheus_data:/prometheus
  8. command:
  9. - '--config.file=/etc/prometheus/prometheus.yml'
  10. - '--storage.tsdb.path=/prometheus'
  11. - '--web.console.libraries=/usr/share/prometheus/console_libraries'
  12. - '--web.console.templates=/usr/share/prometheus/consoles'
  13. ports:
  14. - 9090:9090
  15. restart: always
  16. grafana:
  17. image: grafana/grafana
  18. depends_on:
  19. - prometheus
  20. ports:
  21. - 3000:3000
  22. volumes:
  23. - ./monitor/grafana_data:/var/lib/grafana
  24. - ./monitor/grafana/provisioning/:/etc/grafana/provisioning/
  25. env_file:
  26. - ./monitor/grafana/config.monitoring
  27. restart: always