0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-03-15 10:55:09 +01:00
nextcloud-docker/.config/redis.config.php
Arjun Santhosh ccdd2806e2
Merge branch 'master' into patch-1
Signed-off-by: Arjun Santhosh <139119101+Hujgo@users.noreply.github.com>
2024-09-20 14:08:55 +04:00

18 lines
634 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') ? 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;
}
}