From 5fc893755fcaf7f306e19421194f88f30c0673b9 Mon Sep 17 00:00:00 2001 From: Henrik Jess Nielsen Date: Tue, 28 Apr 2026 21:46:57 +0200 Subject: [PATCH] Gunicorn: log to stdout/stderr + preload for crash visibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - --access-logfile - : access logs to stdout (visible in Nomad) - --error-logfile - : error logs to stderr (visible in Nomad) - --log-level info : show startup and worker events - --preload : load app before forking workers — crashes surface immediately instead of silently dying --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 166a153..f8fbd93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,4 +26,4 @@ RUN mkdir -p /app/instance EXPOSE 5000 -CMD ["sh", "-c", "gunicorn --bind ${HOST}:${PORT} --workers 2 --timeout 60 app:app"] +CMD ["sh", "-c", "gunicorn --bind ${HOST}:${PORT} --workers 2 --timeout 60 --access-logfile - --error-logfile - --log-level info --preload app:app"]