Skip to content

Commit d87fe5a

Browse files
committed
Add REDIS_HOST_USER variable to specify a redis user
Signed-off-by: hagene <[email protected]>
1 parent 08ac248 commit d87fe5a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.config/redis.config.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@
1414
} elseif (getenv('REDIS_HOST')[0] != '/') {
1515
$CONFIG['redis']['port'] = 6379;
1616
}
17+
18+
if (getenv('REDIS_HOST_USER') !== false) {
19+
$CONFIG['redis']['user'] = (string) getenv('REDIS_HOST_USER');
20+
}
1721
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ To use Redis for memory caching as well as PHP session storage, specify the foll
236236

237237
- `REDIS_HOST` (not set by default) Name of Redis container
238238
- `REDIS_HOST_PORT` (default: `6379`) Optional port for Redis, only use for external Redis servers that run on non-standard ports.
239+
- `REDIS_HOST_USER` (not set by default) Optional username for Redis, only use for external Redis servers that require a user.
239240
- `REDIS_HOST_PASSWORD` (not set by default) Redis password
240241

241242
Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html) for more information.

0 commit comments

Comments
 (0)