36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
services:
|
|
prometheus:
|
|
image: prom/prometheus:v2.30.3
|
|
container_name: prometheus
|
|
volumes:
|
|
- ./prometheus/prometheus-autodiscover.yml:/etc/prometheus/prometheus.yml:ro
|
|
- prometheus_data:/prometheus:rw
|
|
- prometheus-docker-sd:/prometheus-docker-sd:ro
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
|
- '--web.console.templates=/etc/prometheus/consoles'
|
|
- '--storage.tsdb.retention.time=200h'
|
|
- '--web.enable-lifecycle'
|
|
restart: unless-stopped
|
|
labels:
|
|
org.label-schema.group: "monitoring"
|
|
depends_on:
|
|
- prometheus-docker-sd
|
|
- wireguard
|
|
network_mode: "service:wireguard"
|
|
|
|
prometheus-docker-sd:
|
|
image: "stucky/prometheus-docker-sd:latest"
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- prometheus-docker-sd:/prometheus-docker-sd:rw
|
|
|
|
### VOLUMES
|
|
|
|
volumes:
|
|
prometheus_data:
|
|
prometheus-docker-sd:
|