mirror of
https://github.com/StepanovPlaton/HomeServerServices.git
synced 2026-04-03 20:30:44 +04:00
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
services:
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
container_name: prometheus
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
|
- prometheus_data:/prometheus
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
# ports:
|
|
# - "9090:9090"
|
|
networks:
|
|
- grafana_network
|
|
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
container_name: grafana
|
|
restart: unless-stopped
|
|
ports:
|
|
- ${GRAFANA_PORT:?}:3000
|
|
volumes:
|
|
- ./grafana:/etc/grafana/provisioning
|
|
- grafana_data:/var/lib/grafana
|
|
environment:
|
|
- GF_SECURITY_ADMIN_USER=${GRAFANA_USER:?} # Ваш логин
|
|
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:?} # Ваш пароль
|
|
networks:
|
|
- grafana_network
|
|
|
|
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)($$|/)'
|
|
- '--collector.systemd'
|
|
# ports:
|
|
# - "9100:9100"
|
|
networks:
|
|
- grafana_network
|
|
|
|
volumes:
|
|
prometheus_data:
|
|
grafana_data:
|
|
|
|
networks:
|
|
grafana_network:
|
|
driver: bridge
|