49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
container_name: prometheus
|
|
volumes:
|
|
- ./prometheus:/etc/prometheus
|
|
- prometheus-data:/prometheus
|
|
command:
|
|
- "--config.file=/etc/prometheus/prometheus.yml"
|
|
- "--storage.tsdb.path=/prometheus"
|
|
- "--web.enable-lifecycle"
|
|
ports:
|
|
- "9090:9090"
|
|
restart: unless-stopped
|
|
|
|
grafana:
|
|
image: grafana/grafana-oss:latest
|
|
container_name: grafana
|
|
environment:
|
|
- GF_SECURITY_ADMIN_USER=admin
|
|
- GF_SECURITY_ADMIN_PASSWORD="REDACTED_PASSWORD"
|
|
volumes:
|
|
- grafana-data:/var/lib/grafana
|
|
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
|
|
- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
|
- ./grafana/dashboards:/var/lib/grafana/dashboards
|
|
ports:
|
|
- "3300:3000"
|
|
restart: unless-stopped
|
|
|
|
node_exporter:
|
|
image: prom/node-exporter:latest
|
|
container_name: node_exporter
|
|
network_mode: host
|
|
pid: host
|
|
volumes:
|
|
- /:/host:ro,rslave
|
|
- /sys:/host/sys:ro
|
|
- /proc:/host/proc:ro
|
|
command:
|
|
- '--path.rootfs=/host'
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
prometheus-data:
|
|
grafana-data:
|