0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-06-16 16:14:47 +02:00
nextcloud-docker/19.0/apache/config/redis.config.php
Fabian 6b110abda6
Add dbindex in connection properties
Let the user to choose a dbindex for his Redis connection to separate data in his Redis instance
2020-10-25 12:12:51 +01:00

21 lines
587 B
PHP

<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'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;
}
if (getenv('REDIS_DB_INDEX') !== false) {
$CONFIG['redis']['dbindex'] = getenv('REDIS_DB_INDEX');
}
}