Persistence prometheus data

This commit is contained in:
2025-01-15 19:56:41 +08:00
parent 004adf6705
commit e771dfecc6
2 changed files with 8 additions and 0 deletions

View File

@@ -29,14 +29,17 @@ services:
prometheus:
image: prom/prometheus:latest
user: "1000:1000"
restart: always
command:
- --storage.tsdb.retention.time=365d
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
ports:
- "8083:9090"
volumes:
- ./data/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./data/prometheus/data:/prometheus
node_exporter:
image: prom/node-exporter:latest