File tree Expand file tree Collapse file tree 7 files changed +15
-10
lines changed
Expand file tree Collapse file tree 7 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ RUN set -ex; \
138138 \
139139 { \
140140 echo 'session.save_handler = redis' ; \
141- echo 'session.save_path = "tcp://${REDIS_HOST}:6379 ?database=${REDIS_DB_INDEX}${REDIS_USER_AUTH}&auth[]=${REDIS_HOST_PASSWORD}"' ; \
141+ echo 'session.save_path = "tcp://${REDIS_HOST}:${REDIS_PORT} ?database=${REDIS_DB_INDEX}${REDIS_USER_AUTH}&auth[]=${REDIS_HOST_PASSWORD}"' ; \
142142 echo 'redis.session.locking_enabled = 1' ; \
143143 echo 'redis.session.lock_retries = -1' ; \
144144 echo 'redis.session.lock_wait_time = 10000' ; \
Original file line number Diff line number Diff line change 99 ),
1010 );
1111
12- if (getenv ('REDIS_HOST_PORT ' )) {
13- $ CONFIG ['redis ' ]['port ' ] = (int ) getenv ('REDIS_HOST_PORT ' );
14- } elseif (getenv ('REDIS_HOST ' )[0 ] != '/ ' ) {
15- $ CONFIG ['redis ' ]['port ' ] = 6379 ;
12+ if (getenv ('REDIS_PORT ' )) {
13+ $ CONFIG ['redis ' ]['port ' ] = (int ) getenv ('REDIS_PORT ' );
1614 }
1715
1816 if (getenv ('REDIS_DB_INDEX ' )) {
Original file line number Diff line number Diff line change 2727
2828# Only start container if Redis is accessible
2929# shellcheck disable=SC2153
30- while ! nc -z " $REDIS_HOST " " 6379 " ; do
30+ while ! nc -z " $REDIS_HOST " " $REDIS_PORT " ; do
3131 echo " Waiting for Redis to start..."
3232 sleep 5
3333done
Original file line number Diff line number Diff line change 5252if [ -z " $REDIS_DB_INDEX " ]; then
5353 REDIS_DB_INDEX=0
5454fi
55+ # Set a default value for REDIS_PORT
56+ if [ -z " $REDIS_PORT " ]; then
57+ REDIS_PORT=6379
58+ fi
5559# Set a default for db type
5660if [ -z " $DATABASE_TYPE " ]; then
5761 DATABASE_TYPE=postgres
7680
7781# Set sensitive values as env
7882export DATABASE_URL=" $DATABASE_TYPE ://$POSTGRES_USER :$POSTGRES_PASSWORD @$POSTGRES_HOST :$POSTGRES_PORT /$POSTGRES_DB$CERT_OPTIONS "
79- export REDIS_URL=" redis://$REDIS_USER :$REDIS_HOST_PASSWORD @$REDIS_HOST /$REDIS_DB_INDEX "
83+ export REDIS_URL=" redis://$REDIS_USER :$REDIS_HOST_PASSWORD @$REDIS_HOST : $REDIS_PORT /$REDIS_DB_INDEX "
8084
8185# Run it
8286/nextcloud/custom_apps/notify_push/bin/" $CPU_ARCH " /notify_push \
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- nc -z " $REDIS_HOST " 6379 || exit 0
3+ nc -z " $REDIS_HOST " " $REDIS_PORT " || exit 0
44nc -z 127.0.0.1 3002 || exit 1
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33# Only start container if nextcloud is accessible
4- while ! nc -z " $REDIS_HOST " 6379 ; do
4+ while ! nc -z " $REDIS_HOST " " $REDIS_PORT " ; do
55 echo " Waiting for redis to start..."
66 sleep 5
77done
@@ -11,7 +11,7 @@ if [ -z "$REDIS_DB_INDEX" ]; then
1111 REDIS_DB_INDEX=0
1212fi
1313
14- export REDIS_URL=" redis://$REDIS_USER :$REDIS_HOST_PASSWORD @$REDIS_HOST /$REDIS_DB_INDEX "
14+ export REDIS_URL=" redis://$REDIS_USER :$REDIS_HOST_PASSWORD @$REDIS_HOST : $REDIS_PORT /$REDIS_DB_INDEX "
1515
1616# Run it
1717exec npm --prefix /app run server:start
Original file line number Diff line number Diff line change 204204 " POSTGRES_DB=nextcloud_database" ,
205205 " POSTGRES_USER=nextcloud" ,
206206 " REDIS_HOST=nextcloud-aio-redis" ,
207+ " REDIS_PORT=6379" ,
207208 " REDIS_HOST_PASSWORD=%REDIS_PASSWORD%" ,
208209 " APACHE_HOST=nextcloud-aio-apache" ,
209210 " APACHE_PORT=%APACHE_PORT%" ,
305306 " NEXTCLOUD_HOST=nextcloud-aio-nextcloud" ,
306307 " TZ=%TIMEZONE%" ,
307308 " REDIS_HOST=nextcloud-aio-redis" ,
309+ " REDIS_PORT=6379" ,
308310 " REDIS_HOST_PASSWORD=%REDIS_PASSWORD%" ,
309311 " POSTGRES_HOST=nextcloud-aio-database" ,
310312 " POSTGRES_PORT=5432" ,
875877 " JWT_SECRET_KEY=%WHITEBOARD_SECRET%" ,
876878 " STORAGE_STRATEGY=redis" ,
877879 " REDIS_HOST=nextcloud-aio-redis" ,
880+ " REDIS_PORT=6379" ,
878881 " REDIS_HOST_PASSWORD=%REDIS_PASSWORD%" ,
879882 " BACKUP_DIR=/tmp"
880883 ],
You can’t perform that action at this time.
0 commit comments