77 lines
2.0 KiB
YAML
77 lines
2.0 KiB
YAML
networks:
|
|
monitoring:
|
|
driver: bridge
|
|
volumes:
|
|
prometheus_data: {}
|
|
services:
|
|
node-exporter:
|
|
image: prom/node-exporter:latest
|
|
container_name: node-exporter
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /proc:/host/proc:ro
|
|
- /sys:/host/sys:ro
|
|
- /:/rootfs:ro
|
|
command:
|
|
- '--path.procfs=/host/proc'
|
|
- '--path.rootfs=/rootfs'
|
|
- '--path.sysfs=/host/sys'
|
|
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
|
|
ports:
|
|
- 9100:9100
|
|
networks:
|
|
- monitoring
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
user: "1000"
|
|
environment:
|
|
- PUID=1001
|
|
- PGID=1001
|
|
container_name: prometheus
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ~/Docker/promgrafnode/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
- ~/Docker/promgrafnode/prometheus:/prometheus
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
|
- '--web.console.templates=/etc/prometheus/consoles'
|
|
- '--web.enable-lifecycle'
|
|
ports:
|
|
- 9091:9090
|
|
networks:
|
|
- monitoring
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
user: "1000"
|
|
container_name: grafana
|
|
ports:
|
|
- 3001:3000
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ~/Docker/promgrafnode/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
|
|
- ~/Docker/promgrafnode/grafana:/var/lib/grafana
|
|
networks:
|
|
- monitoring
|
|
cadvisor:
|
|
image: gcr.io/cadvisor/cadvisor:latest
|
|
container_name: cadvisor
|
|
ports:
|
|
- 8081:8080
|
|
networks:
|
|
- monitoring
|
|
volumes:
|
|
- /:/rootfs:ro
|
|
- /var/run:/var/run:rw
|
|
- /sys:/sys:ro
|
|
- /var/lib/docker/:/var/lib/docker:ro
|
|
depends_on:
|
|
- redis
|
|
redis:
|
|
image: redis:latest
|
|
container_name: redis
|
|
ports:
|
|
- 6379:6379
|
|
networks:
|
|
- monitoring |