From 6ca7322aeed2f28e58ba4e0f5126f7159d9f70ac Mon Sep 17 00:00:00 2001 From: Florian Gabsteiger Date: Fri, 30 Aug 2019 22:38:38 +0200 Subject: [PATCH] Move static file collection from docker entrypoint to Dockerfile to reduce superflous work --- Dockerfile | 2 ++ scripts/docker-entrypoint.sh | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index cfcfbd25c..0c47a9efa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,3 +65,5 @@ COPY src/ /usr/src/paperless/src/ COPY data/ /usr/src/paperless/data/ COPY media/ /usr/src/paperless/media/ +# Collect static files +RUN sudo -HEu paperless /usr/src/paperless/src/manage.py collectstatic --clear --no-input \ No newline at end of file diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh index 303d1b8de..5cfcd4023 100644 --- a/scripts/docker-entrypoint.sh +++ b/scripts/docker-entrypoint.sh @@ -55,15 +55,10 @@ migrations() { fi } -collectstatic() { - sudo -HEu paperless "/usr/src/paperless/src/manage.py" "collectstatic" "--clear" "--no-input" -} - initialize() { map_uidgid set_permissions migrations - collectstatic } install_languages() {