mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-11-09 21:50:48 +08:00
Merge pull request #5870 from nextcloud/enh/noid/allow-configure-redis-user
allow to configure redis user
This commit is contained in:
commit
b6ad2782e4
4 changed files with 7 additions and 3 deletions
|
|
@ -147,7 +147,7 @@ RUN set -ex; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
echo 'session.save_handler = redis'; \
|
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}${REDIS_USER_AUTH}&auth[]=${REDIS_HOST_PASSWORD}"'; \
|
||||||
echo 'redis.session.locking_enabled = 1'; \
|
echo 'redis.session.locking_enabled = 1'; \
|
||||||
echo 'redis.session.lock_retries = -1'; \
|
echo 'redis.session.lock_retries = -1'; \
|
||||||
echo 'redis.session.lock_wait_time = 10000'; \
|
echo 'redis.session.lock_wait_time = 10000'; \
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,8 @@ if (getenv('REDIS_HOST')) {
|
||||||
if (getenv('REDIS_DB_INDEX')) {
|
if (getenv('REDIS_DB_INDEX')) {
|
||||||
$CONFIG['redis']['dbindex'] = (int) getenv('REDIS_DB_INDEX');
|
$CONFIG['redis']['dbindex'] = (int) getenv('REDIS_DB_INDEX');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getenv('REDIS_USER_AUTH') !== false) {
|
||||||
|
$CONFIG['redis']['user'] = str_replace("&auth[]=", "", getenv('REDIS_USER_AUTH'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ fi
|
||||||
|
|
||||||
# Set sensitive values as env
|
# Set sensitive values as env
|
||||||
export DATABASE_URL="$DATABASE_TYPE://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB"
|
export DATABASE_URL="$DATABASE_TYPE://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB"
|
||||||
export REDIS_URL="redis://:$REDIS_HOST_PASSWORD@$REDIS_HOST/$REDIS_DB_INDEX"
|
export REDIS_URL="redis://$REDIS_USER:$REDIS_HOST_PASSWORD@$REDIS_HOST/$REDIS_DB_INDEX"
|
||||||
|
|
||||||
# Run it
|
# Run it
|
||||||
/nextcloud/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push \
|
/nextcloud/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push \
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ if [ -z "$REDIS_DB_INDEX" ]; then
|
||||||
REDIS_DB_INDEX=0
|
REDIS_DB_INDEX=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export REDIS_URL="redis://:$REDIS_HOST_PASSWORD@$REDIS_HOST/$REDIS_DB_INDEX"
|
export REDIS_URL="redis://$REDIS_USER:$REDIS_HOST_PASSWORD@$REDIS_HOST/$REDIS_DB_INDEX"
|
||||||
|
|
||||||
# Run it
|
# Run it
|
||||||
exec npm run server:start
|
exec npm run server:start
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue