From ceaabee7a0974f23cb5e9d537d4cc60bdfabb938 Mon Sep 17 00:00:00 2001 From: Eric Gullickson <16152721+ericgullickson@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:49:28 -0600 Subject: [PATCH] chore: add Docker log rotation to all services (refs #85) Add logging configuration with json-file driver and rotation to all 6 services: - mvp-traefik - mvp-frontend - mvp-backend - mvp-ocr - mvp-postgres - mvp-redis Configuration: - max-size: 10m (10MB per log file) - max-file: 3 (keep 3 rotated files) - Total max storage: 6 x 30MB = 180MB Co-Authored-By: Claude Opus 4.5 --- docker-compose.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index f4af2a4..5122289 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -39,6 +39,11 @@ services: - "traefik.http.routers.traefik-dashboard.tls=true" - "traefik.http.services.traefik-dashboard.loadbalancer.server.port=8080" - "traefik.http.middlewares.dashboard-auth.basicauth.users=admin:$$2y$$10$$foobar" + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" # Application Services - Frontend SPA mvp-frontend: @@ -87,6 +92,11 @@ services: - "traefik.http.services.mvp-frontend.loadbalancer.healthcheck.path=/" - "traefik.http.services.mvp-frontend.loadbalancer.healthcheck.interval=30s" - "traefik.http.services.mvp-frontend.loadbalancer.passhostheader=true" + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" # Application Services - Backend API mvp-backend: @@ -163,6 +173,11 @@ services: - "traefik.http.services.mvp-backend.loadbalancer.healthcheck.interval=30s" - "traefik.http.services.mvp-backend.loadbalancer.healthcheck.timeout=10s" - "traefik.http.services.mvp-backend.loadbalancer.passhostheader=true" + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" # Application Services - OCR Processing mvp-ocr: @@ -187,6 +202,11 @@ services: timeout: 10s retries: 3 start_period: 30s + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" # Database Services - Application PostgreSQL mvp-postgres: @@ -212,6 +232,11 @@ services: timeout: 5s retries: 5 start_period: 30s + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" # Database Services - Application Redis mvp-redis: @@ -230,6 +255,11 @@ services: interval: 10s timeout: 5s retries: 5 + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" # Network Definition networks: