From d1ed06a4c43692b801a58704f089fcfd85370019 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Fri, 3 Apr 2026 17:10:22 -0400 Subject: [PATCH] fix: resolve logrotate permission issues in maintenance container --- conf/crontab | 2 +- conf/logrotate.conf | 4 ++-- docker-compose.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/crontab b/conf/crontab index 90a3cf9..1ffcf81 100644 --- a/conf/crontab +++ b/conf/crontab @@ -1,2 +1,2 @@ 55 * * * * bash /scripts/backup_internal.sh >> /logs/backup_cron.log 2>&1 -0 0 * * * /usr/sbin/logrotate /etc/logrotate.conf +0 0 * * * /usr/sbin/logrotate /etc/logrotate.internal.conf diff --git a/conf/logrotate.conf b/conf/logrotate.conf index aafc657..57578f3 100644 --- a/conf/logrotate.conf +++ b/conf/logrotate.conf @@ -1,7 +1,7 @@ # Logrotate configuration for Aether Docker Logs (Internal container version) -/logs/*/*.log -/logs/web/*/*.log { +/logs/*/*.log /logs/web/*/*.log { + su aether aether daily rotate 7 missingok diff --git a/docker-compose.yml b/docker-compose.yml index 2066f50..5dd4970 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -228,7 +228,7 @@ services: - ./logs:/logs - ./conf/crontab:/etc/crontabs/root - ./conf/logrotate.conf:/etc/logrotate.conf - command: sh -c "apk add --no-cache docker-cli bash logrotate && crond -f -l 2" + command: sh -c "apk add --no-cache docker-cli bash logrotate && adduser -u 1000 -D aether && cp /etc/logrotate.conf /etc/logrotate.internal.conf && chown root:root /etc/logrotate.internal.conf && crond -f -l 2" depends_on: - mariadb logging: