Skip to content

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

Copy gunicorn.conf to docker container and use it in entrypoint

Florian Gabsteigerbdeaf3346269
diff --git a/Dockerfile b/Dockerfile
index 51c919b20..30eb3a5bc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,9 +4,10 @@ LABEL maintainer="The Paperless Project https://github.com/the-paperless-project
contributors="Guy Addadi <[email protected]>, Pit Kleyersburg <[email protected]>, \
Sven Fischer <[email protected]>"
-# Copy Pipfiles file and init script
+# Copy Pipfiles file, init script and gunicorn.conf
COPY Pipfile* /usr/src/paperless/
COPY scripts/docker-entrypoint.sh /sbin/docker-entrypoint.sh
+COPY scripts/gunicorn.conf /usr/src/paperless/
# Set export and consumption directories
ENV PAPERLESS_EXPORT_DIR=/export \
diff --git a/docker-compose.yml.example b/docker-compose.yml.example
index 312467b91..5a6a5ed0e 100644
--- a/docker-compose.yml.example
+++ b/docker-compose.yml.example
@@ -27,7 +27,7 @@ services:
# value with nothing.
environment:
- PAPERLESS_OCR_LANGUAGES=
- command: ["runserver", "--insecure", "--noreload", "0.0.0.0:8000"]
+ command: ["gunicorn"]
consumer:
build: ./
diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh
index bc4824a86..8e6b819e0 100644
--- a/scripts/docker-entrypoint.sh
+++ b/scripts/docker-entrypoint.sh
@@ -101,7 +101,7 @@ if [[ "$1" != "/"* ]]; then
if [[ "$1" = "gunicorn" ]]; then
cd /usr/src/paperless/src/ && \
- exec sudo -HEu paperless /usr/bin/gunicorn -c gunicorn.conf paperless.wsgi
+ exec sudo -HEu paperless /usr/bin/gunicorn -c /usr/src/paperless/gunicorn.conf paperless.wsgi
else
exec sudo -HEu paperless "/usr/src/paperless/src/manage.py" "$@"
fi