From 13e29d904042cb09e7151fb665ca4feca453c6bb Mon Sep 17 00:00:00 2001 From: ginnoir Date: Wed, 1 Jul 2026 02:11:38 -0500 Subject: [PATCH] fix(logs): cap json-file log size on authentik/immich/mariadb These three containers were writing multi-GB/day of unbounded logs (authentik_server 3.5GB, immich-server 2.3GB, owncloud_mariadb 2.1GB), a major contributor to a recent 100% disk-full incident. Daemon-wide default (max-size 10m, max-file 3) was also added to /etc/docker/daemon.json on valhalla, but that only covers newly created containers going forward -- these three need the explicit per-service override since they're long-running and won't be recreated otherwise. Co-Authored-By: Claude Sonnet 5 --- stacks/authentik/docker-compose.yml | 5 +++++ stacks/owncloud/docker-compose.yml | 5 +++++ stacks/photos/docker-compose.yml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/stacks/authentik/docker-compose.yml b/stacks/authentik/docker-compose.yml index 899ca2f..3b57fc6 100644 --- a/stacks/authentik/docker-compose.yml +++ b/stacks/authentik/docker-compose.yml @@ -23,6 +23,11 @@ services: - ./blueprints:/blueprints/custom:ro ports: - "9200:9000" + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" depends_on: authentik-db: condition: service_healthy diff --git a/stacks/owncloud/docker-compose.yml b/stacks/owncloud/docker-compose.yml index 1148307..282af93 100644 --- a/stacks/owncloud/docker-compose.yml +++ b/stacks/owncloud/docker-compose.yml @@ -48,6 +48,11 @@ services: environment: - MYSQL_DATABASE=owncloud command: ["--max-allowed-packet=128M", "--innodb-log-file-size=64M"] + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" healthcheck: # $$ defers expansion to container runtime (env_file supplies the value) test: ["CMD-SHELL", "mariadb-admin ping -u root --password=\"$$MYSQL_ROOT_PASSWORD\""] diff --git a/stacks/photos/docker-compose.yml b/stacks/photos/docker-compose.yml index fda0fba..1ae4d24 100644 --- a/stacks/photos/docker-compose.yml +++ b/stacks/photos/docker-compose.yml @@ -16,6 +16,11 @@ services: - /etc/localtime:/etc/localtime:ro ports: - "2283:2283" + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" depends_on: - immich-redis - immich-postgres