fix(docker): set log rotation to avoid docker bugs (#8269)

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.
This commit is contained in:
kai 2024-02-20 17:40:38 +07:00 committed by GitHub
parent 663c57700b
commit 6c0aa042ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,10 @@ services:
memory: 16G
env_file:
- .env
logging:
options:
max-size: "10m"
max-file: "5"
#! Uncomment the `configs` mapping below to use the `zebrad.toml` config file from the host machine
#! NOTE: This will override the zebrad.toml in the image and make some variables irrelevant
# configs: