Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Move static file collection from docker entrypoint to Dockerfile to reduce superflous work

Florian Gabsteiger6ca7322aeed2
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() {