0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-02-23 18:34:54 +01:00

Update redis.config.php (#2232)

Correctly set the redis password config from the REDIS_HOST_PASSWORD_FILE environment variable. Fix an issue similar to #1402 when using the REDIS_HOST_PASSWORD_FILE environment variable to provide the redis host secret.

Signed-off-by: Vesperia Art <vesperiaart@gmail.com>
This commit is contained in:
Vesperia Art 2024-06-06 17:27:42 -04:00 committed by GitHub
parent 5fdeb7bc4a
commit ec1af314c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) {
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'password' => (string) getenv('REDIS_HOST_PASSWORD'),
'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'),
),
);