nextcloud: allow to configure redis user

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2025-01-13 11:15:29 +01:00
parent c1f1207a0e
commit 2fc2be363a
4 changed files with 7 additions and 3 deletions

View file

@ -147,7 +147,7 @@ RUN set -ex; \
\
{ \
echo 'session.save_handler = redis'; \
echo 'session.save_path = "tcp://${REDIS_HOST}:6379/${REDIS_DB_INDEX}?auth=${REDIS_HOST_PASSWORD}"'; \
echo 'session.save_path = "tcp://${REDIS_HOST}:6379?database=${REDIS_DB_INDEX}&auth[]=${REDIS_USER}&auth[]=${REDIS_HOST_PASSWORD}"'; \
echo 'redis.session.locking_enabled = 1'; \
echo 'redis.session.lock_retries = -1'; \
echo 'redis.session.lock_wait_time = 10000'; \

View file

@ -18,4 +18,8 @@ if (getenv('REDIS_HOST')) {
if (getenv('REDIS_DB_INDEX')) {
$CONFIG['redis']['dbindex'] = (int) getenv('REDIS_DB_INDEX');
}
if (getenv('REDIS_USER') !== false) {
$CONFIG['redis']['user'] = getenv('REDIS_USER');
}
}