diff options
Diffstat (limited to '.config/redis.config.php')
-rw-r--r-- | .config/redis.config.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/.config/redis.config.php b/.config/redis.config.php index 19676160..9429c901 100644 --- a/.config/redis.config.php +++ b/.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; + } +} |