From 374495c5656727adf82509aec1a79c13f3a23bf6 Mon Sep 17 00:00:00 2001 From: janz Date: Mon, 2 Sep 2024 12:01:10 +0200 Subject: [PATCH] Adding support for configuring redis dbindex value Signed-off-by: Jan Zalar jan.zalar6@gmail.com Signed-off-by: janz --- 29/apache/config/redis.config.php | 4 ++++ README.md | 1 + 2 files changed, 5 insertions(+) diff --git a/29/apache/config/redis.config.php b/29/apache/config/redis.config.php index a5b13da6..bed36145 100644 --- a/29/apache/config/redis.config.php +++ b/29/apache/config/redis.config.php @@ -14,4 +14,8 @@ if (getenv('REDIS_HOST')) { } elseif (getenv('REDIS_HOST')[0] != '/') { $CONFIG['redis']['port'] = 6379; } + if (getenv('REDIS_DBINDEX') !== false) { + $CONFIG['redis']['dbindex'] = (int) getenv('REDIS_DBINDEX'); + } + } diff --git a/README.md b/README.md index b9f7a66d..b732f9dc 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,7 @@ If you want to use Redis you have to create a separate [Redis](https://hub.docke - `REDIS_HOST` (not set by default) Name of Redis container - `REDIS_HOST_PORT` (default: `6379`) Optional port for Redis, only use for external Redis servers that run on non-standard ports. - `REDIS_HOST_PASSWORD` (not set by default) Redis password +- `REDIS_DBINDEX`(not set by default) Value for dbindex config value The use of Redis is recommended to prevent file locking problems. See the examples for further instructions.