2020-04-10 15:27:12 +02:00
|
|
|
<?php
|
|
|
|
if (getenv('REDIS_HOST')) {
|
2020-11-07 01:36:28 +01:00
|
|
|
$CONFIG = array(
|
2020-04-10 15:27:12 +02: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'),
|
2020-04-10 15:27:12 +02:00
|
|
|
),
|
|
|
|
);
|
|
|
|
|
|
|
|
if (getenv('REDIS_HOST_PORT') !== false) {
|
|
|
|
$CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
|
|
|
|
} elseif (getenv('REDIS_HOST')[0] != '/') {
|
|
|
|
$CONFIG['redis']['port'] = 6379;
|
|
|
|
}
|
|
|
|
}
|