Compare commits

...

2 Commits

Author SHA1 Message Date
Simon 5072b4e506 Add shared x-logging template to compose files
Every service now uses `logging: *default-logging` (json-file,
10m x 3). Previously ~35 services had no limit and grew unbounded.
Also fix the broken restart line in x-common-keys-monitoring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 05:28:24 +01:00
Simon 08393fe565 Add dockge, move librespeed/spoolman to stacks, inline evcc, HA 2026.10 2026-10-27 05:28:18 +01:00
4 changed files with 124 additions and 209 deletions

View File

@ -1,13 +1,15 @@
version: '3' version: '3'
x-logging: &default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
services: services:
wordpress: wordpress:
container_name: peek container_name: peek
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
depends_on: depends_on:
- db_peek - db_peek
image: wordpress:php8.4-apache image: wordpress:php8.4-apache
@ -53,11 +55,7 @@ services:
db_peek: db_peek:
container_name: db_peek container_name: db_peek
image: mysql:8.4 image: mysql:8.4
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
volumes: volumes:
- ${DIR_LOCAL}/peekskog/db84:/var/lib/mysql - ${DIR_LOCAL}/peekskog/db84:/var/lib/mysql
restart: always restart: always
@ -74,11 +72,7 @@ services:
- db_peek - db_peek
image: phpmyadmin/phpmyadmin image: phpmyadmin/phpmyadmin
container_name: phpmyadmin_peek container_name: phpmyadmin_peek
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
restart: always restart: always
networks: networks:
- backend - backend

View File

@ -1,14 +1,16 @@
version: '3' version: '3'
x-logging: &default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
services: services:
zigbee_home_2: zigbee_home_2:
container_name: zigbee_home_2 container_name: zigbee_home_2
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
networks: networks:
- backend - backend
ports: ports:
@ -36,11 +38,7 @@ services:
zigbee2mqtt: zigbee2mqtt:
container_name: zigbee2mqtt container_name: zigbee2mqtt
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
networks: networks:
- backend - backend
image: koenkk/zigbee2mqtt:2.13 image: koenkk/zigbee2mqtt:2.13
@ -69,11 +67,7 @@ services:
influx: influx:
image: influxdb:2.7 image: influxdb:2.7
container_name: influxdb container_name: influxdb
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
networks: networks:
- backend - backend
restart: always restart: always
@ -112,11 +106,7 @@ services:
image: telegraf:1.25 image: telegraf:1.25
restart: always restart: always
container_name: telegraf container_name: telegraf
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
networks: networks:
- backend - backend
ports: ports:
@ -141,11 +131,7 @@ services:
gitea: gitea:
image: gitea/gitea:1.21 image: gitea/gitea:1.21
container_name: gitea container_name: gitea
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
networks: networks:
- backend - backend
restart: always restart: always
@ -176,11 +162,7 @@ services:
# image: eclipse-mosquitto:1.6.13 # image: eclipse-mosquitto:1.6.13
image: eclipse-mosquitto:2.0.18 image: eclipse-mosquitto:2.0.18
container_name: mqtt container_name: mqtt
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
networks: networks:
- backend - backend
restart: always restart: always
@ -214,10 +196,7 @@ services:
mqtt_landet: mqtt_landet:
image: eclipse-mosquitto:2.0.9 image: eclipse-mosquitto:2.0.9
container_name: mqtt_landet container_name: mqtt_landet
logging: logging: *default-logging
options:
max-size: "10m"
max-file: "5"
networks: networks:
- backend - backend
restart: always restart: always
@ -238,6 +217,7 @@ services:
diun: diun:
image: ghcr.io/crazy-max/diun:4 image: ghcr.io/crazy-max/diun:4
container_name: diun container_name: diun
logging: *default-logging
networks: networks:
- backend - backend
volumes: volumes:

View File

@ -1,14 +1,16 @@
version: '3' version: '3'
x-logging: &default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
services: services:
milvert: milvert:
container_name: milvert container_name: milvert
image: nginx:latest image: nginx:latest
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
restart: always restart: always
networks: networks:
- backend - backend
@ -30,6 +32,7 @@ services:
whoami: whoami:
# A container that exposes an API to show its IP address # A container that exposes an API to show its IP address
container_name: whoami container_name: whoami
logging: *default-logging
image: containous/whoami image: containous/whoami
networks: networks:
- backend - backend
@ -49,11 +52,7 @@ services:
# A container that exposes an API to show its IP address # A container that exposes an API to show its IP address
container_name: ttrss container_name: ttrss
image: wangqiru/ttrss:latest image: wangqiru/ttrss:latest
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
restart: unless-stopped restart: unless-stopped
networks: networks:
- backend - backend
@ -77,11 +76,7 @@ services:
image: diak:1.0 image: diak:1.0
build: ./diabets_app/client build: ./diabets_app/client
container_name: diak container_name: diak
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
networks: networks:
- backend - backend
ports: ports:
@ -101,11 +96,7 @@ services:
syncthing: syncthing:
image: linuxserver/syncthing image: linuxserver/syncthing
container_name: syncthing container_name: syncthing
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
environment: environment:
- PUID=1000 - PUID=1000
- PGID=1000 - PGID=1000
@ -134,11 +125,7 @@ services:
torrent: torrent:
image: linuxserver/rutorrent image: linuxserver/rutorrent
container_name: torrent container_name: torrent
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
environment: environment:
- PUID=1000 - PUID=1000
- PGID=1000 - PGID=1000
@ -161,6 +148,7 @@ services:
librespeed: librespeed:
image: ghcr.io/linuxserver/librespeed image: ghcr.io/linuxserver/librespeed
container_name: librespeed container_name: librespeed
logging: *default-logging
environment: environment:
- PUID=${UUID} - PUID=${UUID}
- PGID=${PGID} - PGID=${PGID}

View File

@ -24,6 +24,8 @@ secrets:
file: $SECRETSDIR/vwconnect_password file: $SECRETSDIR/vwconnect_password
skoda_password: skoda_password:
file: $SECRETSDIR/skoda_password file: $SECRETSDIR/skoda_password
skoda_api_key:
file: $SECRETSDIR/skoda_api_key
skoda_spin: skoda_spin:
file: $SECRETSDIR/skoda_spin file: $SECRETSDIR/skoda_spin
carconnect_grafana_pw: carconnect_grafana_pw:
@ -36,9 +38,6 @@ secrets:
file: $SECRETSDIR/livesync_bridge_config.json file: $SECRETSDIR/livesync_bridge_config.json
include:
- ./evcc/docker-compose.yml
########################### EXTENSION FIELDS ########################## ########################### EXTENSION FIELDS ##########################
# Helps eliminate repetition of sections # Helps eliminate repetition of sections
# More Info on how to use this: https://github.com/htpcBeginner/docker-traefik/pull/228 # More Info on how to use this: https://github.com/htpcBeginner/docker-traefik/pull/228
@ -52,20 +51,49 @@ x-common-keys-monitoring: &common-keys-monitoring
networks: networks:
- backend - backend
security_opt: security_opt:
- no-new-privileges:true restart: always - no-new-privileges:true
restart: always
x-logging: &default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
services: services:
dockge:
image: louislam/dockge:1
container_name: dockge
logging: *default-logging
restart: unless-stopped
environment:
- DOCKGE_STACKS_DIR=/home/simon/repo/Docker/stacks
- PUID=${UID}
- PGID=${GID}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/simon/repo/Docker/dockge-data:/app/data
- /home/simon/repo/Docker/stacks:/home/simon/repo/Docker/stacks
networks:
- frontend
labels:
- diun.enable=true
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.services.dockge-service.loadbalancer.server.port=5001"
- "traefik.http.routers.dockge-secure.entrypoints=web-secure"
- "traefik.http.routers.dockge-secure.rule=Host(`dockge.${DOMAIN}`)"
- "traefik.http.routers.dockge-secure.middlewares=chain-authelia@file"
- "traefik.http.routers.dockge-secure.tls.certresolver=milvert_dns"
- "traefik.http.routers.dockge-secure.tls=true"
reverse-proxy: reverse-proxy:
# The official v2.0 Traefik docker image # The official v2.0 Traefik docker image
#image: traefik:v2.11 #image: traefik:v2.11
image: traefik:v3.7 image: traefik:v3.7
container_name: "traefik" container_name: "traefik"
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
restart: unless-stopped restart: unless-stopped
networks: networks:
- backend - backend
@ -105,6 +133,7 @@ services:
authelia: authelia:
image: authelia/authelia:4 image: authelia/authelia:4
container_name: authelia container_name: authelia
logging: *default-logging
restart: always restart: always
volumes: volumes:
- ./authelia:/config - ./authelia:/config
@ -153,6 +182,7 @@ services:
ddns-updater: ddns-updater:
image: qmcgaw/ddns-updater:2.7 image: qmcgaw/ddns-updater:2.7
container_name: ddns-updater container_name: ddns-updater
logging: *default-logging
restart: always restart: always
networks: networks:
- backend - backend
@ -195,11 +225,7 @@ services:
db: db:
image: mariadb:10.5.6 image: mariadb:10.5.6
container_name: mariaDB container_name: mariaDB
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
restart: always restart: always
networks: networks:
- backend - backend
@ -221,11 +247,7 @@ services:
web_db: web_db:
image: adminer image: adminer
container_name: adminer container_name: adminer
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
restart: always restart: always
networks: networks:
- backend - backend
@ -249,11 +271,7 @@ services:
postgres: postgres:
image: postgres:15 image: postgres:15
container_name: postgres container_name: postgres
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
restart: always restart: always
networks: networks:
- backend - backend
@ -273,11 +291,7 @@ services:
pgadmin: pgadmin:
container_name: pgadmin_container container_name: pgadmin_container
image: dpage/pgadmin4 image: dpage/pgadmin4
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
environment: environment:
PUID: ${UID} PUID: ${UID}
PGID: ${GID} PGID: ${GID}
@ -304,11 +318,7 @@ services:
redis: redis:
image: redis:7.0-alpine image: redis:7.0-alpine
container_name: redis container_name: redis
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
restart: always restart: always
networks: networks:
- backend - backend
@ -326,7 +336,8 @@ services:
ha: ha:
container_name: ha container_name: ha
image: homeassistant/home-assistant:2026.9 logging: *default-logging
image: homeassistant/home-assistant:2026.10
restart: always restart: always
privileged: true privileged: true
networks: networks:
@ -362,6 +373,7 @@ services:
hassconf: hassconf:
container_name: hassconf container_name: hassconf
logging: *default-logging
image: causticlab/hass-configurator-docker:0.5.2 image: causticlab/hass-configurator-docker:0.5.2
restart: unless-stopped restart: unless-stopped
networks: networks:
@ -382,6 +394,7 @@ services:
appdaemon: appdaemon:
container_name: appdaemon container_name: appdaemon
logging: *default-logging
image: acockburn/appdaemon:4.5.13 image: acockburn/appdaemon:4.5.13
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
@ -406,6 +419,7 @@ services:
zwave-js: zwave-js:
container_name: zwave-js container_name: zwave-js
logging: *default-logging
image: zwavejs/zwave-js-ui:9 image: zwavejs/zwave-js-ui:9
restart: always restart: always
tty: true tty: true
@ -430,6 +444,7 @@ services:
esphome: esphome:
container_name: esphome container_name: esphome
logging: *default-logging
image: ghcr.io/esphome/esphome:2025.7.3 image: ghcr.io/esphome/esphome:2025.7.3
volumes: volumes:
- ./esphome:/config - ./esphome:/config
@ -453,6 +468,7 @@ services:
matter-server: matter-server:
image: ghcr.io/matter-js/python-matter-server:stable image: ghcr.io/matter-js/python-matter-server:stable
container_name: matter-server container_name: matter-server
logging: *default-logging
restart: unless-stopped restart: unless-stopped
network_mode: host network_mode: host
#networks: #networks:
@ -469,15 +485,34 @@ services:
environment: environment:
- diun.enable=true - diun.enable=true
evcc:
command:
- evcc
container_name: evcc
logging: *default-logging
image: evcc/evcc:0.317.2
ports:
- 7070:7070/tcp
volumes:
- "./evcc/evcc.yaml:/etc/evcc.yaml:ro"
- ./evcc/evcc:/root/.evcc
restart: unless-stopped
networks:
- backend
labels:
- diun.enable=true
- "traefik.enable=true"
- "traefik.http.routers.evcc.entrypoints=web-secure"
- "traefik.http.routers.evcc.rule=Host(`box.${DOMAIN}`)"
- "traefik.http.services.evcc.loadbalancer.server.port=7070"
- "traefik.http.routers.evcc.middlewares=chain-no-auth@file"
- "traefik.http.routers.evcc.tls.certresolver=milvert_dns"
- "traefik.http.routers.evcc.tls=true"
grafana: grafana:
image: grafana/grafana:10.3.1 image: grafana/grafana:10.3.1
container_name: grafana container_name: grafana
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
restart: always restart: always
networks: networks:
- backend - backend
@ -499,11 +534,7 @@ services:
image: nodered/node-red:4.1 image: nodered/node-red:4.1
# command: ["node-red", "--safe"] # command: ["node-red", "--safe"]
container_name: "node-red" container_name: "node-red"
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
networks: networks:
- backend - backend
environment: environment:
@ -530,11 +561,7 @@ services:
nextcloud: nextcloud:
container_name: nextcloud container_name: nextcloud
image: nextcloud:28 image: nextcloud:28
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
restart: always restart: always
ports: ports:
- "8009:80" - "8009:80"
@ -584,11 +611,7 @@ services:
gitea: gitea:
image: gitea/gitea:1.21 image: gitea/gitea:1.21
container_name: gitea container_name: gitea
logging: logging: *default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
networks: networks:
- backend - backend
restart: always restart: always
@ -619,6 +642,7 @@ services:
uptime_kuma: uptime_kuma:
image: louislam/uptime-kuma image: louislam/uptime-kuma
container_name: uptime_kuma container_name: uptime_kuma
logging: *default-logging
networks: networks:
- backend - backend
environment: environment:
@ -645,88 +669,10 @@ services:
# #
############################################################### ###############################################################
librespeed:
image: ghcr.io/linuxserver/librespeed:5.2.5
container_name: librespeed
environment:
- PUID=${UUID}
- PGID=${PGID}
- TZ=${TZ}
- PASSWORD=${LIBRESPEED_PW}
- CUSTOM_RESULTS=false
- DB_TYPE=sqlite
volumes:
- ./librespeed/config:/config
restart: unless-stopped
networks:
- backend
labels:
- diun.enable=true
- "traefik.enable=true"
- "traefik.http.routers.librespeed.entrypoints=web-secure"
- "traefik.http.routers.librespeed.rule=Host(`librespeed.${DOMAIN}`)"
- "traefik.http.routers.librespeed.middlewares=chain-authelia@file"
- "traefik.http.routers.librespeed.tls.certresolver=milvert_dns"
- "traefik.http.routers.librespeed.tls=true"
spoolman:
image: ghcr.io/donkie/spoolman:0.23
container_name: spoolman
restart: unless-stopped
networks:
- backend
volumes:
- ${DIR_LOCAL}/spoolman/data:/home/app/.local/share/spoolman
environment:
- TZ=Europe/Stockholm
labels:
- "diun.enable=true"
- "traefik.enable=true"
- "traefik.http.services.spoolman-service.loadbalancer.server.port=8000"
- "traefik.http.routers.spoolman-secure.entrypoints=web-secure"
- "traefik.http.routers.spoolman-secure.rule=Host(`spoolman.${DOMAIN}`)"
- "traefik.http.routers.spoolman-secure.tls.certresolver=milvert_dns"
- "traefik.http.routers.spoolman-secure.tls=true"
- "traefik.http.routers.spoolman-secure.middlewares=chain-authelia@file"
spoolman-updater:
image: marcokreeft/spoolman-updater:latest
container_name: spoolman-updater
restart: unless-stopped
secrets:
- home_assistant_token_spoolman
entrypoint:
- /bin/sh
- -c
- |
export APPLICATION__HOMEASSISTANT__TOKEN="$$(cat /run/secrets/home_assistant_token_spoolman)"
exec dotnet Application.dll
ports:
- "8089:8080"
networks:
- backend
environment:
- TZ=Europe/Stockholm
- APPLICATION__HOMEASSISTANT__URL=http://ha:8123
- APPLICATION__SPOOLMAN__URL=http://spoolman:8000
- APPLICATION__HOMEASSISTANT__EXTERNALSPOOLENTITY=sensor.a1mini_0309da441900142_externalspool_external_spool
- APPLICATION__HOMEASSISTANT__TRAYENTITIES__0=sensor.a1mini_0309da441900142_ams_1_tray_1
- APPLICATION__HOMEASSISTANT__TRAYENTITIES__1=sensor.a1mini_0309da441900142_ams_1_tray_2
- APPLICATION__HOMEASSISTANT__TRAYENTITIES__2=sensor.a1mini_0309da441900142_ams_1_tray_3
- APPLICATION__HOMEASSISTANT__TRAYENTITIES__3=sensor.a1mini_0309da441900142_ams_1_tray_4
labels:
- "diun.enable=true"
- "traefik.enable=true"
- "traefik.http.services.spoolman-updater-service.loadbalancer.server.port=8080"
- "traefik.http.routers.spoolman-updater-secure.entrypoints=web-secure"
- "traefik.http.routers.spoolman-updater-secure.rule=Host(`spoolman-updater.${DOMAIN}`)"
- "traefik.http.routers.spoolman-updater-secure.tls.certresolver=milvert_dns"
- "traefik.http.routers.spoolman-updater-secure.tls=true"
- "traefik.http.routers.spoolman-updater-secure.middlewares=chain-authelia@file"
jelu: jelu:
image: wabayang/jelu image: wabayang/jelu
container_name: jelu container_name: jelu
logging: *default-logging
environment: environment:
- PUID=${UUID} - PUID=${UUID}
- PGID=${PGID} - PGID=${PGID}
@ -757,6 +703,7 @@ services:
vwsfriend: vwsfriend:
image: tillsteinbach/vwsfriend:0.24.7 image: tillsteinbach/vwsfriend:0.24.7
container_name: vwfriend container_name: vwfriend
logging: *default-logging
ports: ports:
- ${VWSFRIEND_PORT-4000}:${VWSFRIEND_PORT-4000} - ${VWSFRIEND_PORT-4000}:${VWSFRIEND_PORT-4000}
networks: networks:
@ -799,6 +746,7 @@ services:
vwgrafana: vwgrafana:
image: tillsteinbach/vwsfriend-grafana:0.24.5 image: tillsteinbach/vwsfriend-grafana:0.24.5
container_name: vwgrafana container_name: vwgrafana
logging: *default-logging
ports: ports:
- ${GF_SERVER_HTTP_PORT-3001}:${GF_SERVER_HTTP_PORT-3000} - ${GF_SERVER_HTTP_PORT-3001}:${GF_SERVER_HTTP_PORT-3000}
networks: networks:
@ -857,6 +805,7 @@ services:
carconnectivity: carconnectivity:
image: "tillsteinbach/carconnectivity-mqtt:latest" image: "tillsteinbach/carconnectivity-mqtt:latest"
container_name: carconnectivity container_name: carconnectivity
logging: *default-logging
volumes: volumes:
- ./carconnectivity/carconnectivity.json:/carconnectivity.json - ./carconnectivity/carconnectivity.json:/carconnectivity.json
- ./carconnectivity/entrypoint.sh:/root/entrypoint.sh:ro - ./carconnectivity/entrypoint.sh:/root/entrypoint.sh:ro
@ -869,6 +818,7 @@ services:
- TMPDIR=/state - TMPDIR=/state
secrets: secrets:
- skoda_password - skoda_password
- skoda_api_key
- skoda_spin - skoda_spin
entrypoint: ["/root/entrypoint.sh"] entrypoint: ["/root/entrypoint.sh"]
command: ["carconnectivity-mqtt", "/carconnectivity.json"] command: ["carconnectivity-mqtt", "/carconnectivity.json"]
@ -881,6 +831,7 @@ services:
carconnectivity-grafana: carconnectivity-grafana:
image: "ghcr.io/tillsteinbach/carconnectivity-grafana:edge" image: "ghcr.io/tillsteinbach/carconnectivity-grafana:edge"
container_name: carconnect-grafana container_name: carconnect-grafana
logging: *default-logging
volumes: volumes:
- ${DIR_LOCAL}/carconnect-grafana:/var/lib/grafana - ${DIR_LOCAL}/carconnect-grafana:/var/lib/grafana
# - ${DIR_LOCAL}/carconnectivity/sqlite.db:/carconnectivity.db:ro # - ${DIR_LOCAL}/carconnectivity/sqlite.db:/carconnectivity.db:ro
@ -916,6 +867,7 @@ services:
couchdb: couchdb:
image: couchdb:3.5 image: couchdb:3.5
container_name: couchdb container_name: couchdb
logging: *default-logging
restart: unless-stopped restart: unless-stopped
entrypoint: ["/bin/sh", "/couchdb-entrypoint.sh"] entrypoint: ["/bin/sh", "/couchdb-entrypoint.sh"]
networks: networks:
@ -946,6 +898,7 @@ services:
build: https://github.com/vrtmrz/livesync-bridge.git#fc0e028d33b3a12ddee1322951375e05107edc55 build: https://github.com/vrtmrz/livesync-bridge.git#fc0e028d33b3a12ddee1322951375e05107edc55
image: livesync-bridge:fc0e028 image: livesync-bridge:fc0e028
container_name: livesync-bridge container_name: livesync-bridge
logging: *default-logging
restart: unless-stopped restart: unless-stopped
user: "${UID}:${GID}" user: "${UID}:${GID}"
depends_on: depends_on: