From 7e8402aeb0d2c38c89f756aaf9f395a784b0bd63 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 14 Aug 2024 13:51:21 +0200 Subject: [PATCH] adjust redis connector to point at correct db-index Signed-off-by: Simon L. --- Containers/nextcloud/Dockerfile | 3 ++- Containers/notify-push/start.sh | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 8bfc7d6f..fea2ea14 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -5,6 +5,7 @@ ENV PHP_MEMORY_LIMIT=512M ENV PHP_UPLOAD_LIMIT=10G ENV PHP_MAX_TIME=3600 ENV SOURCE_LOCATION=/usr/src/nextcloud +ENV REDIS_DB_INDEX=0 # AIO settings start # Do not remove or change this line! ENV NEXTCLOUD_VERSION=29.0.4 @@ -131,7 +132,7 @@ RUN set -ex; \ \ { \ echo 'session.save_handler = redis'; \ - echo 'session.save_path = "tcp://${REDIS_HOST}:6379?auth=${REDIS_HOST_PASSWORD}"'; \ + echo 'session.save_path = "tcp://${REDIS_HOST}:6379/${REDIS_DB_INDEX}?auth=${REDIS_HOST_PASSWORD}"'; \ echo 'redis.session.locking_enabled = 1'; \ echo 'redis.session.lock_retries = -1'; \ echo 'redis.session.lock_wait_time = 10000'; \ diff --git a/Containers/notify-push/start.sh b/Containers/notify-push/start.sh index 6180162f..1f77b0f1 100644 --- a/Containers/notify-push/start.sh +++ b/Containers/notify-push/start.sh @@ -48,9 +48,14 @@ echo "notify-push was started" if [ -z "$POSTGRES_PORT" ]; then POSTGRES_PORT=5432 fi +# Set a default for redis db index +if [ -z "$REDIS_DB_INDEX" ]; then + REDIS_DB_INDEX=0 +fi + # Set sensitive values as env export DATABASE_URL="postgres://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB" -export REDIS_URL="redis://:$REDIS_HOST_PASSWORD@$REDIS_HOST" +export REDIS_URL="redis://:$REDIS_HOST_PASSWORD@$REDIS_HOST/$REDIS_DB_INDEX" # Run it /nextcloud/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push \