Implement comprehensive Docker log rotation #171
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements comprehensive Docker log rotation across all services in the Local AI Package to prevent unbounded disk usage.
Problem
Currently, only 3 out of 20+ services have log rotation configured (caddy, redis, searxng). The remaining 17+ services use Docker's default
json-filelogging driver WITHOUT size limits, causing logs to grow indefinitely. High-volume services like n8n, ClickHouse, Postgres, and Langfuse-worker could generate 1-10GB of logs per week, leading to disk full scenarios within 1-3 months on typical installations.Solution
Added Docker Compose logging configuration to all services using the
json-filedriver with appropriatemax-sizeandmax-filesettings. Services are configured with tiered rotation limits based on their expected log verbosity:Changes
docker-compose.ymlx-ollamaandx-init-ollamaYAML anchors with logging config (applies to all Ollama variants)README.mddocker-compose.yml.backup-before-log-rotationImpact
Test Plan
Notes
docker-compose.ymlsupabase/docker/docker-compose.yml) are not modified in this PR and would require a separate docker-compose.override.yml🤖 Generated with Claude Code