0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-06-17 08:34:48 +02:00

Fix Redis Unix socket support

Rebase and rewrite the @epma01 pull request, based on last Nextcloud Docker changes
See: https://github.com/nextcloud/docker/pull/735

Signed-off-by: Tortue Torche <tortuetorche@users.noreply.github.com>
This commit is contained in:
Tortue Torche 2019-12-16 10:57:22 +01:00
parent b3f71af495
commit 2c87f4e586
2 changed files with 14 additions and 3 deletions

View file

@ -5,9 +5,13 @@ if (getenv('REDIS_HOST')) {
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_HOST_PORT') ?: 6379,
'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
}
if (getenv('REDIS_HOST_PORT') !== false) {
$CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
} elseif (getenv('REDIS_HOST')[0] != '/') {
$CONFIG['redis']['port'] = 6379;
}
}