Add gunicorn option to docker-entrypoint script

This commit is contained in:
Florian Gabsteiger 2019-08-09 00:44:41 +02:00 committed by Florian Gabsteiger
parent 1c956652f3
commit dcc959d4f7

View File

@ -99,7 +99,12 @@ if [[ "$1" != "/"* ]]; then
install_languages "$PAPERLESS_OCR_LANGUAGES"
fi
exec sudo -HEu paperless "/usr/src/paperless/src/manage.py" "$@"
if [[ "$1" = "gunicorn" ]]; then
cd /usr/src/paperless/src/ && \
exec sudo -HEu paperless /usr/bin/gunicorn -c gunicorn.conf paperless.wsgi
else
exec sudo -HEu paperless "/usr/src/paperless/src/manage.py" "$@"
fi
fi
exec "$@"