2019-12-05 15:00:23 +01:00
|
|
|
<?php
|
|
|
|
if (getenv('REDIS_HOST')) {
|
2020-11-07 01:36:28 +01:00
|
|
|
$CONFIG = array(
|
2019-12-05 15:00:23 +01:00
|
|
|
'memcache.distributed' => '\OC\Memcache\Redis',
|
|
|
|
'memcache.locking' => '\OC\Memcache\Redis',
|
|
|
|
'redis' => array(
|
|
|
|
'host' => getenv('REDIS_HOST'),
|
2020-11-07 01:36:28 +01:00
|
|
|
'password' => (string) getenv('REDIS_HOST_PASSWORD'),
|
2019-12-05 15:00:23 +01:00
|
|
|
),
|
|
|
|
);
|
|
|
|
|
2020-01-11 00:38:38 +01:00
|
|
|
if (getenv('REDIS_HOST_PORT') !== false) {
|
|
|
|
$CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
|
|
|
|
} elseif (getenv('REDIS_HOST')[0] != '/') {
|
|
|
|
$CONFIG['redis']['port'] = 6379;
|
|
|
|
}
|
|
|
|
}
|