From 46275161e0a2360f1f177a877d9cd75c75e6c5ba Mon Sep 17 00:00:00 2001 From: ai-bot Date: Tue, 13 Oct 2026 16:38:35 +0000 Subject: [PATCH] docker: copy every application module, so auth.py reaches the image --- Dockerfile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index e5d9013..4e2ee9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,12 +4,17 @@ FROM python:3.13-slim WORKDIR /app -# The whole application. static/ MUST be copied: app.py answers /health from -# code, but every page and asset is read from ./static, so an image without it -# reports a healthy service whose entire UI answers 404. maintenance.py MUST be -# copied too: the StartOS actions run it in a temporary subcontainer, so an -# image without it fails at runtime on the box while the tests stay green. -COPY app.py database.py alerts.py export.py validation.py maintenance.py ./ +# The application modules, all of them. The wildcard is deliberate: the build +# context is the repository root and .dockerignore keeps everything else out +# (tests, data, node_modules, the build output), so every top-level .py is an +# application module. Listing them by hand is how auth.py was once left out, +# which broke the admin login and the Set Admin Password action at runtime on +# the box while every test stayed green: a module the image is missing is a +# ModuleNotFoundError when the command runs, not a build error. +COPY *.py ./ +# static/ MUST be copied: app.py answers /health from code, but every page and +# asset is read from ./static, so an image without it reports a healthy service +# whose entire UI answers 404. COPY static ./static ENV PORT=8080