From 5b985d2eaf1db075d3c2f55016907bfc6d91ca08 Mon Sep 17 00:00:00 2001 From: Markbeep Date: Tue, 30 Dec 2025 09:58:12 +0000 Subject: [PATCH] fix: fix missing fetch for js files in dockerfile --- .dockerignore | 6 ++++++ Dockerfile | 4 ++++ static/.dockerignore | 2 -- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .dockerignore delete mode 100644 static/.dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5825c4d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +static/globals.css +static/htmx-preload.js +static/htmx.js +static/alpine.js +static/toastify.js +static/toastify.css diff --git a/Dockerfile b/Dockerfile index 5a4d66c..2c89abf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,7 @@ RUN mkdir -p static && \ curl -Lo static/daisyui.mjs https://github.com/saadeghi/daisyui/releases/latest/download/daisyui.mjs && \ curl -Lo static/daisyui-theme.mjs https://github.com/saadeghi/daisyui/releases/latest/download/daisyui-theme.mjs +COPY templates/ templates/ COPY static/tw.css static/tw.css RUN /bin/tailwindcss -i static/tw.css -o static/globals.css -m @@ -27,6 +28,8 @@ FROM astral/uv:python3.13-alpine AS python-deps WORKDIR /app COPY uv.lock pyproject.toml ./ RUN uv sync --frozen --no-cache --no-dev +COPY app/util/fetch_js.py app/util/fetch_js.py +RUN mkdir -p static && /app/.venv/bin/python app/util/fetch_js.py # ---- Final ---- FROM python:3.13-alpine AS final @@ -34,6 +37,7 @@ WORKDIR /app COPY --from=css /app/static/globals.css static/globals.css COPY --from=python-deps /app/.venv /app/.venv +COPY --from=python-deps /app/static static/ COPY static/ static/ COPY alembic/ alembic/ diff --git a/static/.dockerignore b/static/.dockerignore deleted file mode 100644 index 2358380..0000000 --- a/static/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -globals.css -tw.css