fix(docker): set log rotation to avoid docker bugs #8269
Merged
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.
Containers can generate a significant amount of logs, consuming disk space over time. Here I added configuration for maximum log file size (max-size) and the number of retained log files (max-file) in the logging driver options to control disk usage and prevent log files from growing indefinitely.
Motivation
What are the most important goals of the ticket or PR?
There is a possible docker bugs which causes no logs to be saved or printed in containers with significant amount of logs, for example 3 days of zebra initial sync.
Refs:
PR Author Checklist
Check before marking the PR as ready for review:
If a checkbox isn't relevant to the PR, mark it as done.
Solution
Add logging options to docker-compose.yml to run zebra with ligthwalletd.
Testing
Manual testing done by running
docker compose up
again from the same directory.Reviewer Checklist
Check before approving the PR:
PR blockers can be dealt with in new tickets or PRs.
And check the PR Author checklist is complete.