mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 07:15:07 +01:00
Support SSL for web interface
Thanks to @MasterofJOKers, here is basic support for SSL: You need to create your key and certificate and copy them to the `data` directory, named `ssl.cert` and `ssl.key`. Then, set `PAPERLESS_USE_SSL` in `docker-compose.env` to `true`. Solves #576.
This commit is contained in:
parent
a690b1cf24
commit
9b2b435c5b
3 changed files with 15 additions and 2 deletions
|
|
@ -101,8 +101,14 @@ if [[ "$1" != "/"* ]]; then
|
|||
|
||||
if [[ "$1" = "gunicorn" ]]; then
|
||||
shift
|
||||
EXTRA_PARAMS=""
|
||||
SSL_KEY_PATH="/usr/src/paperless/data/ssl.key"
|
||||
SSL_CERT_PATH="/usr/src/paperless/data/ssl.cert"
|
||||
if [ "${PAPERLESS_USE_SSL}" = "true" ] && [ -f "${SSL_KEY_PATH}" ] && [ -f "${SSL_CERT_PATH}" ]; then
|
||||
EXTRA_PARAMS="--certfile=${SSL_CERT_PATH} --keyfile=${SSL_KEY_PATH}"
|
||||
fi
|
||||
cd /usr/src/paperless/src/ && \
|
||||
exec sudo -HEu paperless /usr/bin/gunicorn -c /usr/src/paperless/gunicorn.conf "$@" paperless.wsgi
|
||||
exec sudo -HEu paperless /usr/bin/gunicorn -c /usr/src/paperless/gunicorn.conf ${EXTRA_PARAMS} "$@" paperless.wsgi
|
||||
else
|
||||
exec sudo -HEu paperless "/usr/src/paperless/src/manage.py" "$@"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue