Nextcloud-Docker/17.0/fpm-alpine/config/redis.config.php
Tortue Torche d9ab30a969 Fix Redis Unix socket support (#944)
* 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>

* Fix CI tests with update.sh script

Signed-off-by: Tortue Torche <tortuetorche@users.noreply.github.com>
2020-01-10 23:38:38 +00:00

18 lines
476 B
PHP

<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'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;
}
}