Files
docker/monitoring/docker-compose.yaml

90 lines
2.3 KiB
YAML

version: "3.9"
networks:
proxy:
external: true
monitoring:
name: monitoring
external: false
volumes:
telegraf:
name: telegraf
influx:
name: influx
influx-etc:
name: influx-etc
services:
apc:
image: cs-registry.ddnss.de/home/apc
container_name: apc
hostname: apc
tty: true
devices:
- /dev/usb/hiddev0
networks:
- proxy
- monitoring
labels:
- "traefik.enable=true"
- "traefik.http.routers.apc.rule=Host(`apc.lan`)"
- "traefik.http.routers.apc.entrypoints=web"
- "traefik.http.routers.apc.service=apc"
- "traefik.http.services.apc.loadbalancer.server.port=80"
- "com.centurylinklabs.watchtower.enable=false"
ports:
- "3551:3551/tcp"
- "3551:3551/udp"
telegraf:
image: telegraf:alpine
container_name: telegraf
hostname: telegraf
networks:
- monitoring
user: telegraf:998
volumes:
- telegraf:/etc/telegraf/
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- influx
influx:
image: influxdb:alpine
container_name: influx
hostname: influx
volumes:
- influx:/var/lib/influxdb2
- influx-etc:/etc/influxdb2
networks:
- proxy
- monitoring
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.influx.rule=Host(`influx.lan`)"
- "traefik.http.routers.influx.entrypoints=web"
- "traefik.http.routers.influx.service=influx"
- "traefik.http.services.influx.loadbalancer.server.port=8086"
watchtower:
image: containrrr/watchtower
container_name: watchtower
hostname: watchtower
restart: unless-stopped
networks:
- monitoring
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
- ./watchtower-config.json:/config.json
environment:
WATCHTOWER_INCLUDE_STOPPED: true
WATCHTOWER_MONITOR_ONLY: true
WATCHTOWER_SCHEDULE: "0 20 8 * * *"
WATCHTOWER_NOTIFICATIONS: "shoutrrr"
WATCHTOWER_NOTIFICATION_URL: "mattermost://watchtower@cs-mm.ddnss.de/og4ckuqet7fafb8kjuaigzuh7c"
WATCHTOWER_NOTIFICATION_TEMPLATE: "{{range .}}{{.Time.Format \"2006-01-02 15:04:05\"}} ({{.Level}}): {{.Message}}{{println}}{{end}}"