0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-21 03:06:08 +02:00

Compare commits

...

2 commits

Author SHA1 Message Date
Josh
67e560749b
Merge fdfacbd774 into 71235584cd 2025-02-25 21:19:44 +00:00
Josh R
fdfacbd774
Guarantee REDIS_HOST_PORT is never null for UNIX sockets
Addresses #1785 (which arises when using UNIX sockets)

Without this fix (or manually specifying a bogus REDIS_HOST_PORT) UNIX socket connections won't work if REDIS_HOST is used to specify the socket to the container. 

Signed-off-by: Josh R. <josh.t.richards@gmail.com>
2023-04-16 11:57:07 -04:00

View file

@ -13,6 +13,8 @@ if (getenv('REDIS_HOST')) {
$CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
} elseif (getenv('REDIS_HOST')[0] != '/') {
$CONFIG['redis']['port'] = 6379;
} elseif (getenv('REDIS_HOST')[0] == '/') {
$CONFIG['redis']['port'] = 0;
}
if (getenv('REDIS_HOST_USER') !== false) {