0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2024-09-30 08:22:37 +02:00
nextcloud-docker/.config/redis.config.php
J0WI 2accbecd97
Drop file_exists check for _FILE variables (#2234)
* 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>
2024-06-18 20:13:05 +00:00

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;
}
}