mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
make redis port configurable
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
cd8158c9f6
commit
1691a19036
7 changed files with 15 additions and 10 deletions
|
|
@ -138,7 +138,7 @@ RUN set -ex; \
|
|||
\
|
||||
{ \
|
||||
echo 'session.save_handler = redis'; \
|
||||
echo 'session.save_path = "tcp://${REDIS_HOST}:6379?database=${REDIS_DB_INDEX}${REDIS_USER_AUTH}&auth[]=${REDIS_HOST_PASSWORD}"'; \
|
||||
echo 'session.save_path = "tcp://${REDIS_HOST}:${REDIS_PORT}?database=${REDIS_DB_INDEX}${REDIS_USER_AUTH}&auth[]=${REDIS_HOST_PASSWORD}"'; \
|
||||
echo 'redis.session.locking_enabled = 1'; \
|
||||
echo 'redis.session.lock_retries = -1'; \
|
||||
echo 'redis.session.lock_wait_time = 10000'; \
|
||||
|
|
|
|||
|
|
@ -9,10 +9,8 @@ if (getenv('REDIS_HOST')) {
|
|||
),
|
||||
);
|
||||
|
||||
if (getenv('REDIS_HOST_PORT')) {
|
||||
$CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
|
||||
} elseif (getenv('REDIS_HOST')[0] != '/') {
|
||||
$CONFIG['redis']['port'] = 6379;
|
||||
if (getenv('REDIS_PORT')) {
|
||||
$CONFIG['redis']['port'] = (int) getenv('REDIS_PORT');
|
||||
}
|
||||
|
||||
if (getenv('REDIS_DB_INDEX')) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ fi
|
|||
|
||||
# Only start container if Redis is accessible
|
||||
# shellcheck disable=SC2153
|
||||
while ! nc -z "$REDIS_HOST" "6379"; do
|
||||
while ! nc -z "$REDIS_HOST" "$REDIS_PORT"; do
|
||||
echo "Waiting for Redis to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue