mirror of
https://github.com/nextcloud/docker.git
synced 2025-02-04 18:48:26 +01:00
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>
This commit is contained in:
parent
8df9b2617e
commit
fdfacbd774
1 changed files with 2 additions and 0 deletions
|
@ -13,5 +13,7 @@ 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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue