В
configs:
prometheus.yml:
external: true
...
services:
prometheus:
image: prom/prometheus
ports:
- 9090:9090
configs:
- source: prometheus.yml
target: /etc/prometheus/prometheus.yml
volumes:
- prometheus_db:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
restart: unless-stopped
labels:
org.label-schema.group: 'monitoring'