From 6c0aa042ad237a05818be00647ed828a85fed02b Mon Sep 17 00:00:00 2001 From: kai <58456495+chairulakmal@users.noreply.github.com> Date: Tue, 20 Feb 2024 17:40:38 +0700 Subject: [PATCH] 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. --- docker/docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index fd1b2ccc..9264fd40 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -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: