compose.yaml 473 B

123456789101112131415161718
  1. ---
  2. volumes:
  3. prometheus-data:
  4. driver: local
  5. services:
  6. prometheus:
  7. image: docker.io/prom/prometheus:v3.6.0
  8. container_name: prometheus
  9. command:
  10. - --config.file=/etc/prometheus/prometheus.yaml
  11. - --storage.tsdb.retention.time=7d
  12. - --storage.tsdb.retention.size=2GB
  13. ports:
  14. - 9090:9090
  15. volumes:
  16. - ./config/prometheus.yaml:/etc/prometheus/prometheus.yaml:ro
  17. - prometheus-data:/prometheus
  18. restart: unless-stopped