all-in-one/Containers/nextcloud/config/redis.config.php
Simon L a6f2a3c76d add dbindex for redis as comment
Signed-off-by: Simon L <szaimen@e.mail.de>
2024-03-22 09:58:19 +01:00

18 lines
538 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' => (string) getenv('REDIS_HOST_PASSWORD'),
// 'dbindex' => (int) getenv('REDIS_DB_INDEX'),
),
);
if (getenv('REDIS_HOST_PORT') !== false) {
$CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
} elseif (getenv('REDIS_HOST')[0] != '/') {
$CONFIG['redis']['port'] = 6379;
}
}