Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust redis connector to point at correct db-index #5126

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Containers/nextcloud/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'; \
Expand Down
7 changes: 6 additions & 1 deletion Containers/notify-push/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down