]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
PAPERLESS_REDIS may be set via docker secrets
authorDennis Gaida <2392217+DennisGaida@users.noreply.github.com>
Fri, 12 Aug 2022 11:14:42 +0000 (13:14 +0200)
committerTrenton Holmes <holmes.trenton@gmail.com>
Tue, 16 Aug 2022 19:41:52 +0000 (12:41 -0700)
Best practice is for redis to be at least password protected: https://redis.io/docs/getting-started/.

Paperless uses `Redis.from_url` (https://github.com/paperless-ngx/paperless-ngx/blob/5fe435048bc6eb77f9473afc11588427846456ab/docker/wait-for-redis.py#L24) to establish a connection to redis which already enables us to use username/password, e.g. `redis://username:password@redis:6379`.

The redis connection string therefore is a secret and needs to be able to leverage docker secrets, hence this PR.

docker/docker-entrypoint.sh

index 7a6fa01cb56b4975e035d1cd8f13a4df6341be4f..cc91fadb6c533e7d31fb6800797c7bce7c986eb9 100755 (executable)
@@ -62,7 +62,8 @@ initialize() {
                PAPERLESS_AUTO_LOGIN_USERNAME \
                PAPERLESS_ADMIN_USER \
                PAPERLESS_ADMIN_MAIL \
-               PAPERLESS_ADMIN_PASSWORD; do
+               PAPERLESS_ADMIN_PASSWORD \
+               PAPERLESS_REDIS; do
                # Check for a version of this var with _FILE appended
                # and convert the contents to the env var value
                file_env ${env_var}