nextcloud: properly add REDIS_DB_INDEX

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2024-06-21 10:52:47 +02:00
parent 6bae8cc98a
commit 17e002e929

View file

@ -6,7 +6,6 @@ if (getenv('REDIS_HOST')) {
'redis' => array(
'host' => getenv('REDIS_HOST'),
'password' => (string) getenv('REDIS_HOST_PASSWORD'),
// 'dbindex' => (int) getenv('REDIS_DB_INDEX'),
),
);
@ -15,4 +14,8 @@ if (getenv('REDIS_HOST')) {
} elseif (getenv('REDIS_HOST')[0] != '/') {
$CONFIG['redis']['port'] = 6379;
}
if (getenv('REDIS_DB_INDEX') !== false) {
$CONFIG['redis']['dbindex'] = (int) getenv('REDIS_DB_INDEX');
}
}