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

View File

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

View File

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

View File

@ -24,6 +24,8 @@ secrets:
file: $SECRETSDIR/vwconnect_password
skoda_password:
file: $SECRETSDIR/skoda_password
skoda_api_key:
file: $SECRETSDIR/skoda_api_key
skoda_spin:
file: $SECRETSDIR/skoda_spin
carconnect_grafana_pw:
@ -35,9 +37,6 @@ secrets:
livesync_bridge_config:
file: $SECRETSDIR/livesync_bridge_config.json
include:
- ./evcc/docker-compose.yml
########################### EXTENSION FIELDS ##########################
# Helps eliminate repetition of sections
@ -52,20 +51,49 @@ x-common-keys-monitoring: &common-keys-monitoring
networks:
- backend
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:
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:
# The official v2.0 Traefik docker image
#image: traefik:v2.11
image: traefik:v3.7
container_name: "traefik"
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
logging: *default-logging
restart: unless-stopped
networks:
- backend
@ -105,6 +133,7 @@ services:
authelia:
image: authelia/authelia:4
container_name: authelia
logging: *default-logging
restart: always
volumes:
- ./authelia:/config
@ -153,6 +182,7 @@ services:
ddns-updater:
image: qmcgaw/ddns-updater:2.7
container_name: ddns-updater
logging: *default-logging
restart: always
networks:
- backend
@ -195,11 +225,7 @@ services:
db:
image: mariadb:10.5.6
container_name: mariaDB
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
logging: *default-logging
restart: always
networks:
- backend
@ -221,11 +247,7 @@ services:
web_db:
image: adminer
container_name: adminer
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
logging: *default-logging
restart: always
networks:
- backend
@ -249,11 +271,7 @@ services:
postgres:
image: postgres:15
container_name: postgres
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
logging: *default-logging
restart: always
networks:
- backend
@ -273,11 +291,7 @@ services:
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
logging: *default-logging
environment:
PUID: ${UID}
PGID: ${GID}
@ -304,11 +318,7 @@ services:
redis:
image: redis:7.0-alpine
container_name: redis
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
logging: *default-logging
restart: always
networks:
- backend
@ -326,7 +336,8 @@ services:
ha:
container_name: ha
image: homeassistant/home-assistant:2026.9
logging: *default-logging
image: homeassistant/home-assistant:2026.10
restart: always
privileged: true
networks:
@ -362,6 +373,7 @@ services:
hassconf:
container_name: hassconf
logging: *default-logging
image: causticlab/hass-configurator-docker:0.5.2
restart: unless-stopped
networks:
@ -382,6 +394,7 @@ services:
appdaemon:
container_name: appdaemon
logging: *default-logging
image: acockburn/appdaemon:4.5.13
restart: unless-stopped
depends_on:
@ -406,6 +419,7 @@ services:
zwave-js:
container_name: zwave-js
logging: *default-logging
image: zwavejs/zwave-js-ui:9
restart: always
tty: true
@ -430,6 +444,7 @@ services:
esphome:
container_name: esphome
logging: *default-logging
image: ghcr.io/esphome/esphome:2025.7.3
volumes:
- ./esphome:/config
@ -453,6 +468,7 @@ services:
matter-server:
image: ghcr.io/matter-js/python-matter-server:stable
container_name: matter-server
logging: *default-logging
restart: unless-stopped
network_mode: host
#networks:
@ -469,15 +485,34 @@ services:
environment:
- 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:
image: grafana/grafana:10.3.1
container_name: grafana
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
logging: *default-logging
restart: always
networks:
- backend
@ -499,11 +534,7 @@ services:
image: nodered/node-red:4.1
# command: ["node-red", "--safe"]
container_name: "node-red"
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
logging: *default-logging
networks:
- backend
environment:
@ -530,11 +561,7 @@ services:
nextcloud:
container_name: nextcloud
image: nextcloud:28
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "3"
logging: *default-logging
restart: always
ports:
- "8009:80"
@ -584,11 +611,7 @@ services:
gitea:
image: gitea/gitea:1.21
container_name: gitea
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
logging: *default-logging
networks:
- backend
restart: always
@ -619,6 +642,7 @@ services:
uptime_kuma:
image: louislam/uptime-kuma
container_name: uptime_kuma
logging: *default-logging
networks:
- backend
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:
image: wabayang/jelu
container_name: jelu
logging: *default-logging
environment:
- PUID=${UUID}
- PGID=${PGID}
@ -757,6 +703,7 @@ services:
vwsfriend:
image: tillsteinbach/vwsfriend:0.24.7
container_name: vwfriend
logging: *default-logging
ports:
- ${VWSFRIEND_PORT-4000}:${VWSFRIEND_PORT-4000}
networks:
@ -799,6 +746,7 @@ services:
vwgrafana:
image: tillsteinbach/vwsfriend-grafana:0.24.5
container_name: vwgrafana
logging: *default-logging
ports:
- ${GF_SERVER_HTTP_PORT-3001}:${GF_SERVER_HTTP_PORT-3000}
networks:
@ -857,6 +805,7 @@ services:
carconnectivity:
image: "tillsteinbach/carconnectivity-mqtt:latest"
container_name: carconnectivity
logging: *default-logging
volumes:
- ./carconnectivity/carconnectivity.json:/carconnectivity.json
- ./carconnectivity/entrypoint.sh:/root/entrypoint.sh:ro
@ -869,6 +818,7 @@ services:
- TMPDIR=/state
secrets:
- skoda_password
- skoda_api_key
- skoda_spin
entrypoint: ["/root/entrypoint.sh"]
command: ["carconnectivity-mqtt", "/carconnectivity.json"]
@ -881,6 +831,7 @@ services:
carconnectivity-grafana:
image: "ghcr.io/tillsteinbach/carconnectivity-grafana:edge"
container_name: carconnect-grafana
logging: *default-logging
volumes:
- ${DIR_LOCAL}/carconnect-grafana:/var/lib/grafana
# - ${DIR_LOCAL}/carconnectivity/sqlite.db:/carconnectivity.db:ro
@ -916,6 +867,7 @@ services:
couchdb:
image: couchdb:3.5
container_name: couchdb
logging: *default-logging
restart: unless-stopped
entrypoint: ["/bin/sh", "/couchdb-entrypoint.sh"]
networks:
@ -946,6 +898,7 @@ services:
build: https://github.com/vrtmrz/livesync-bridge.git#fc0e028d33b3a12ddee1322951375e05107edc55
image: livesync-bridge:fc0e028
container_name: livesync-bridge
logging: *default-logging
restart: unless-stopped
user: "${UID}:${GID}"
depends_on: