diff options
author | Tortue Torche <tortuetorche@users.noreply.github.com> | 2020-01-11 00:38:38 +0100 |
---|---|---|
committer | J0WI <J0WI@users.noreply.github.com> | 2020-01-10 23:38:38 +0000 |
commit | d9ab30a96982c4c86e65aa4ae0637c3d37f87bf5 (patch) | |
tree | c67095c8b616fd7293a5f5fe0ab08912ab6a8c1d /18.0-rc/apache/config/redis.config.php | |
parent | b3f71af495124432776515f86da6719ade0df3b3 (diff) |
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>
Diffstat (limited to '18.0-rc/apache/config/redis.config.php')
-rw-r--r-- | 18.0-rc/apache/config/redis.config.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/18.0-rc/apache/config/redis.config.php b/18.0-rc/apache/config/redis.config.php index 19676160..9429c901 100644 --- a/18.0-rc/apache/config/redis.config.php +++ b/18.0-rc/apache/config/redis.config.php @@ -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; + } +} |