From 65a38bbccd76f853bb1111876ff0c77ef94eadfd Mon Sep 17 00:00:00 2001 From: Nathan Schneider Date: Fri, 23 Oct 2026 11:11:08 -0600 Subject: [PATCH] =?UTF-8?q?logguard:=20explicit=20stdout/stderr=20paths=20?= =?UTF-8?q?=E2=80=94=20supervisord's=20auto-named=20childlog=20dir=20crash?= =?UTF-8?q?es=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 825fec0..33c9479 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 # program runs as root and keeps the dated files cloudron-owned (see # 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 -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