87 lines
2.2 KiB
YAML
87 lines
2.2 KiB
YAML
services:
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
container_name: ${HOSTNAME}-prometheus
|
|
ports:
|
|
- "${PROMETHEUS_PORT}:9090"
|
|
volumes:
|
|
- ./configs/prometheus:/etc/prometheus
|
|
- prometheus-data:/prometheus
|
|
command:
|
|
- --config.file=/etc/prometheus/prometheus.yml
|
|
restart: unless-stopped
|
|
|
|
alertmanager:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.alertmanager
|
|
container_name: ${HOSTNAME}-alertmanager
|
|
ports:
|
|
- "${ALERTMANAGER_PORT}:9093"
|
|
volumes:
|
|
- ./configs/alertmanager:/etc/alertmanager
|
|
environment:
|
|
- DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL}
|
|
restart: unless-stopped
|
|
|
|
loki:
|
|
image: grafana/loki:latest
|
|
container_name: ${HOSTNAME}-loki
|
|
ports:
|
|
- "${LOKI_PORT}:3100"
|
|
volumes:
|
|
- ./configs/loki:/etc/loki
|
|
- loki-data:/loki
|
|
command: ["-config.file=/etc/loki/loki-config.yml", "-config.expand-env=true"]
|
|
restart: unless-stopped
|
|
|
|
promtail:
|
|
image: grafana/promtail:latest
|
|
container_name: ${HOSTNAME}-promtail
|
|
volumes:
|
|
- /var/log:/var/log:ro
|
|
- ./configs/promtail:/etc/promtail
|
|
command: -config.file=/etc/promtail/promtail.yml
|
|
restart: unless-stopped
|
|
|
|
node_exporter:
|
|
image: prom/node-exporter:latest
|
|
container_name: ${HOSTNAME}-node_exporter
|
|
ports:
|
|
- "${NODE_EXPORTER_PORT}:9100"
|
|
command:
|
|
- --web.listen-address=:${NODE_EXPORTER_PORT}
|
|
restart: unless-stopped
|
|
|
|
docker_exporter:
|
|
image: prometheusnet/docker_exporter
|
|
container_name: ${HOSTNAME}-docker_exporter
|
|
ports:
|
|
- "${DOCKER_EXPORTER_PORT}:9487"
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
restart: unless-stopped
|
|
|
|
pihole:
|
|
image: pihole/pihole:latest
|
|
container_name: ${HOSTNAME}-pihole
|
|
hostname: ${HOSTNAME}
|
|
ports:
|
|
- "${PIHOLE_WEB_PORT}:80"
|
|
- "${PIHOLE_HTTPS_PORT}:443"
|
|
- "${PIHOLE_DNS_PORT}:53/udp"
|
|
environment:
|
|
TZ: ${TZ}
|
|
WEBPASSWORD: ${WEBPASSWORD}
|
|
volumes:
|
|
- pihole-config:/etc/pihole
|
|
- dnsmasq-config:/etc/dnsmasq.d
|
|
cap_add:
|
|
- NET_ADMIN
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
prometheus-data:
|
|
loki-data:
|
|
pihole-config:
|
|
dnsmasq-config: |