From 87e5a6f27f353b3ee8ff89db70249658790462d9 Mon Sep 17 00:00:00 2001 From: dekzter Date: Mon, 3 Mar 2025 18:29:52 -0500 Subject: [PATCH] missing collectstatic --- docker/Dockerfile | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 6ef4a101..e10c6c90 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -24,12 +24,13 @@ RUN apt-get update && \ pip install --no-cache-dir -r requirements.txt && \ pip install --no-cache-dir -r requirements-pytorch.txt && \ pip install --no-cache-dir -r requirements-sentence-transformers.txt && \ + python manage.py collectstatic && \ echo "installing sentence-transformers" && \ pip install sentence-transformers==3.4.1 && \ cd /app/frontend && \ npm install && \ npm run build && \ - find . -maxdepth 1 ! -name '.' ! -name 'build' -exec rm -rf '{}' \; && \ + find . -maxdepth 1 ! -name '.' ! -name 'build' -exec rm -rf '{}' \; FROM python:3.13-slim @@ -38,6 +39,10 @@ ENV PATH="/dispatcharrpy/bin:$PATH" \ DJANGO_SETTINGS_MODULE=dispatcharr.settings \ PYTHONUNBUFFERED=1 +# Copy the virtual environment and application from the builder stage +COPY --from=builder /dispatcharrpy /dispatcharrpy +COPY --from=builder /app /app + RUN apt-get update && \ apt-get install -y --no-install-recommends \ curl \ @@ -50,6 +55,7 @@ RUN apt-get update && \ procps \ streamlink \ wget && \ + cp /app/docker/nginx.conf /etc/nginx/sites-enabled/default && \ echo "=== setting up postgres ====" && \ echo "deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \ @@ -63,22 +69,16 @@ RUN apt-get update && \ postgresql-contrib-14 \ redis-server && \ mkdir /data && \ - apt-get remove -y \ - gnupg2 \ - gpg \ - lsb-release && \ - apt-get clean && \ - apt-get autoremove -y && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* - -COPY docker/nginx.conf /etc/nginx/sites-enabled/default - -# Copy the virtual environment and application from the builder stage -COPY --from=builder /dispatcharrpy /dispatcharrpy -COPY --from=builder /app /app + apt-get remove -y \ + gnupg2 \ + gpg \ + lsb-release && \ + apt-get clean && \ + apt-get autoremove -y && \ + rm -rf \ + /tmp/* \ + /var/lib/apt/lists/* \ + /var/tmp/* WORKDIR /app