Address comments

This commit is contained in:
Fabian Winter 2019-11-03 20:14:17 +01:00
parent 9b2b435c5b
commit 9c1fcbcc98
3 changed files with 12 additions and 3 deletions

View File

@ -16,6 +16,9 @@
# different from PAPERLESS_OCR_LANGUAGE (default=eng), which defines the # different from PAPERLESS_OCR_LANGUAGE (default=eng), which defines the
# default language used when guessing the language from the OCR output. # default language used when guessing the language from the OCR output.
# PAPERLESS_OCR_LANGUAGES=deu ita # PAPERLESS_OCR_LANGUAGES=deu ita
# Set Paperless to use SSL for the web interface.
# Enabling this will require ssl.key and ssl.cert files in paperless' data directory.
# PAPERLESS_USE_SSL=false # PAPERLESS_USE_SSL=false
# You can change the default user and group id to a custom one # You can change the default user and group id to a custom one

View File

@ -193,10 +193,12 @@ Docker Method
container and thus the one of the consumption directory. Furthermore, you container and thus the one of the consumption directory. Furthermore, you
can change the id of the default user as well using ``USERMAP_UID``. can change the id of the default user as well using ``USERMAP_UID``.
``USE_SSL`` ``PAPERLESS_USE_SSL``
If you want Paperless to use SSL for the user interface, set this variable If you want Paperless to use SSL for the user interface, set this variable
to ``true``. You also need to copy your certificate and key to the ``data`` to ``true``. You also need to copy your certificate and key to the ``data``
directory, named ``ssl.cert`` and ``ssl.key``. directory, named ``ssl.cert`` and ``ssl.key``.
This is not an ideal solution and, if possible, a reverse proxy with nginx
is preferred.
6. Run ``docker-compose up -d``. This will create and start the necessary 6. Run ``docker-compose up -d``. This will create and start the necessary
containers. containers.

View File

@ -104,8 +104,12 @@ if [[ "$1" != "/"* ]]; then
EXTRA_PARAMS="" EXTRA_PARAMS=""
SSL_KEY_PATH="/usr/src/paperless/data/ssl.key" SSL_KEY_PATH="/usr/src/paperless/data/ssl.key"
SSL_CERT_PATH="/usr/src/paperless/data/ssl.cert" SSL_CERT_PATH="/usr/src/paperless/data/ssl.cert"
if [ "${PAPERLESS_USE_SSL}" = "true" ] && [ -f "${SSL_KEY_PATH}" ] && [ -f "${SSL_CERT_PATH}" ]; then if [ "${PAPERLESS_USE_SSL}" = "true" ]; then
EXTRA_PARAMS="--certfile=${SSL_CERT_PATH} --keyfile=${SSL_KEY_PATH}" if [ -f "${SSL_KEY_PATH}" ] && [ -f "${SSL_CERT_PATH}" ]; then
EXTRA_PARAMS="--certfile=${SSL_CERT_PATH} --keyfile=${SSL_KEY_PATH}"
else
echo "Error: Could not find certfile in ${SSL_CERT_PATH} or keyfile in ${SSL_KEY_PATH}, but \$PAPERLESS_USE_SSL is true. Starting without SSL enabled."
fi
fi fi
cd /usr/src/paperless/src/ && \ cd /usr/src/paperless/src/ && \
exec sudo -HEu paperless /usr/bin/gunicorn -c /usr/src/paperless/gunicorn.conf ${EXTRA_PARAMS} "$@" paperless.wsgi exec sudo -HEu paperless /usr/bin/gunicorn -c /usr/src/paperless/gunicorn.conf ${EXTRA_PARAMS} "$@" paperless.wsgi