0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-16 17:26:09 +02:00
nextcloud-docker/.config/redis.config.php
Arjun Santhosh 9f8fca44d4
Update redis.config.php
add dbindex for redis as comment. referenced from a6f2a3c commit

Signed-off-by: Arjun Santhosh <139119101+Hujgo@users.noreply.github.com>
2024-06-15 00:31:01 +05:30

18 lines
685 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_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (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;
}
}