mirror of
https://github.com/nextcloud/docker.git
synced 2025-02-03 10:08:26 +01:00
2accbecd97
* Drop file_exists check for _FILE variables A PHP warning is generated if the file does not exist. Otherwise there is no indicator why the variable is not used. Signed-off-by: J0WI <J0WI@users.noreply.github.com> * fixup: typo in smtp.config.php Signed-off-by: Josh <josh.t.richards@gmail.com> --------- Signed-off-by: J0WI <J0WI@users.noreply.github.com> Signed-off-by: Josh <josh.t.richards@gmail.com> Co-authored-by: Josh <josh.t.richards@gmail.com>
17 lines
583 B
PHP
17 lines
583 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'),
|
|
),
|
|
);
|
|
|
|
if (getenv('REDIS_HOST_PORT') !== false) {
|
|
$CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
|
|
} elseif (getenv('REDIS_HOST')[0] != '/') {
|
|
$CONFIG['redis']['port'] = 6379;
|
|
}
|
|
}
|