diff --git a/.config/redis.config.php b/.config/redis.config.php index 5df799f2..ce5f4773 100644 --- a/.config/redis.config.php +++ b/.config/redis.config.php @@ -5,8 +5,13 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'port' => getenv('REDIS_HOST_PORT') ?: 6379, ), ); + if(getenv('REDIS_HOST_PORT') !== false) { + $CONFIG['redis']['port'] = getenv('REDIS_HOST_PORT'); + } + else if (getenv('REDIS_HOST')[0] != '/') { + $CONFIG['redis']['port'] = 6379; + } }