fix: resolve logrotate permission issues in maintenance container
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
55 * * * * bash /scripts/backup_internal.sh >> /logs/backup_cron.log 2>&1
|
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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Logrotate configuration for Aether Docker Logs (Internal container version)
|
# Logrotate configuration for Aether Docker Logs (Internal container version)
|
||||||
|
|
||||||
/logs/*/*.log
|
/logs/*/*.log /logs/web/*/*.log {
|
||||||
/logs/web/*/*.log {
|
su aether aether
|
||||||
daily
|
daily
|
||||||
rotate 7
|
rotate 7
|
||||||
missingok
|
missingok
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ services:
|
|||||||
- ./logs:/logs
|
- ./logs:/logs
|
||||||
- ./conf/crontab:/etc/crontabs/root
|
- ./conf/crontab:/etc/crontabs/root
|
||||||
- ./conf/logrotate.conf:/etc/logrotate.conf
|
- ./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:
|
depends_on:
|
||||||
- mariadb
|
- mariadb
|
||||||
logging:
|
logging:
|
||||||
|
|||||||
Reference in New Issue
Block a user