59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
services:
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
volumes:
|
|
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
- prometheus_data:/prometheus
|
|
restart: unless-stopped
|
|
|
|
node-exporter:
|
|
image: prom/node-exporter:latest
|
|
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"
|
|
|
|
loki:
|
|
image: grafana/loki:latest
|
|
restart: unless-stopped
|
|
volumes:
|
|
- loki_data:/loki
|
|
|
|
promtail:
|
|
image: grafana/promtail:latest
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./promtail/promtail-config.yml:/etc/promtail/config.yml
|
|
- /var/log:/var/log
|
|
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
container_name: grafana
|
|
restart: unless-stopped
|
|
volumes:
|
|
- grafana_data:/var/lib/grafana
|
|
environment:
|
|
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
|
|
- GF_USERS_ALLOW_SIGN_UP=false
|
|
- GF_AUTH_MULTI_FACTOR_AUTHENTICATION_ENABLED=true
|
|
- GF_AUTH_MULTI_FACTOR_WEBAUTHN_ENABLED=true
|
|
ports:
|
|
- "3000:3000"
|
|
networks:
|
|
- default
|
|
- web
|
|
|
|
volumes:
|
|
prometheus_data:
|
|
loki_data:
|
|
grafana_data:
|
|
|
|
networks:
|
|
default:
|
|
web:
|
|
external: true
|