docker: copy every application module, so auth.py reaches the image
This commit is contained in:
1 parent
00306ea282
commit
46275161e0
1 file changed
+11
-6
+11
-6
@@ -4,12 +4,17 @@ FROM python:3.13-slim
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# The whole application. static/ MUST be copied: app.py answers /health from
|
# The application modules, all of them. The wildcard is deliberate: the build
|
||||||
# code, but every page and asset is read from ./static, so an image without it
|
# context is the repository root and .dockerignore keeps everything else out
|
||||||
# reports a healthy service whose entire UI answers 404. maintenance.py MUST be
|
# (tests, data, node_modules, the build output), so every top-level .py is an
|
||||||
# copied too: the StartOS actions run it in a temporary subcontainer, so an
|
# application module. Listing them by hand is how auth.py was once left out,
|
||||||
# image without it fails at runtime on the box while the tests stay green.
|
# which broke the admin login and the Set Admin Password action at runtime on
|
||||||
COPY app.py database.py alerts.py export.py validation.py maintenance.py ./
|
# 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
|
COPY static ./static
|
||||||
|
|
||||||
ENV PORT=8080
|
ENV PORT=8080
|
||||||
|
|||||||
Reference in new issue
Block a user