logguard: explicit stdout/stderr paths — supervisord's auto-named childlog dir crashes it
This commit is contained in:
1 parent
10b63c9454
commit
65a38bbccd
1 file changed
+3
-1
+3
-1
@@ -71,5 +71,7 @@ RUN sed -i 's|"theme_color": *"#009688"|"theme_color":"#eaf3ea"|; s|"background_
|
|||||||
# then crashes with EACCES on its first log write of the day. This supervisor
|
# then crashes with EACCES on its first log write of the day. This supervisor
|
||||||
# program runs as root and keeps the dated files cloudron-owned (see
|
# program runs as root and keeps the dated files cloudron-owned (see
|
||||||
# assets/log-guard.sh). Remove once the host logrotate config is fixed.
|
# assets/log-guard.sh). Remove once the host logrotate config is fixed.
|
||||||
|
# NOTE: stdout/stderr MUST be explicit paths — supervisord's auto-named child
|
||||||
|
# logs go to a directory that does not exist in this image and crash it.
|
||||||
COPY assets/log-guard.sh /app/code/log-guard.sh
|
COPY assets/log-guard.sh /app/code/log-guard.sh
|
||||||
RUN printf '[program:logguard]\ncommand=/bin/bash /app/code/log-guard.sh\nuser=root\nautorestart=true\nstartsecs=0\npriority=1\n' > /etc/supervisor/conf.d/logguard.conf
|
RUN printf '[program:logguard]\ncommand=/bin/bash /app/code/log-guard.sh\nuser=root\nautorestart=true\nstartsecs=0\npriority=1\nredirect_stderr=true\nstdout_logfile=/app/data/logs/logguard.log\nstdout_logfile_maxbytes=10MB\nstdout_logfile_backups=2\n' > /etc/supervisor/conf.d/logguard.conf
|
||||||
Reference in new issue
Block a user