From c18d0b1f44819b92ed97863e68292e063d30e3b9 Mon Sep 17 00:00:00 2001 From: Adam Vest Date: Fri, 15 Nov 2024 23:52:22 -0500 Subject: [PATCH 1/4] Enable TLS connection for Redis Signed-off-by: Adam Vest --- 28/apache/config/redis.config.php | 2 +- 28/apache/entrypoint.sh | 4 ++-- 28/fpm-alpine/config/redis.config.php | 2 +- 28/fpm-alpine/entrypoint.sh | 4 ++-- 28/fpm/config/redis.config.php | 2 +- 28/fpm/entrypoint.sh | 4 ++-- 29/apache/config/redis.config.php | 2 +- 29/apache/entrypoint.sh | 4 ++-- 29/fpm-alpine/config/redis.config.php | 2 +- 29/fpm-alpine/entrypoint.sh | 4 ++-- 29/fpm/config/redis.config.php | 2 +- 29/fpm/entrypoint.sh | 4 ++-- 30/apache/config/redis.config.php | 2 +- 30/apache/entrypoint.sh | 4 ++-- 30/fpm-alpine/config/redis.config.php | 2 +- 30/fpm-alpine/entrypoint.sh | 4 ++-- 30/fpm/config/redis.config.php | 2 +- 30/fpm/entrypoint.sh | 4 ++-- docker-entrypoint.sh | 4 ++-- 19 files changed, 29 insertions(+), 29 deletions(-) diff --git a/28/apache/config/redis.config.php b/28/apache/config/redis.config.php index a5b13da6..f9049924 100644 --- a/28/apache/config/redis.config.php +++ b/28/apache/config/redis.config.php @@ -4,7 +4,7 @@ if (getenv('REDIS_HOST')) { 'memcache.distributed' => '\OC\Memcache\Redis', 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( - 'host' => getenv('REDIS_HOST'), + 'host' => ($_ENV['REDIS_PROTOCOL'] ?? 'tcp') . "://" . getenv('REDIS_HOST'), 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/28/apache/entrypoint.sh b/28/apache/entrypoint.sh index 8e178f2e..ab4e9488 100755 --- a/28/apache/entrypoint.sh +++ b/28/apache/entrypoint.sh @@ -120,9 +120,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi # check if redis password has been set elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" fi echo "redis.session.locking_enabled = 1" echo "redis.session.lock_retries = -1" diff --git a/28/fpm-alpine/config/redis.config.php b/28/fpm-alpine/config/redis.config.php index a5b13da6..f9049924 100644 --- a/28/fpm-alpine/config/redis.config.php +++ b/28/fpm-alpine/config/redis.config.php @@ -4,7 +4,7 @@ if (getenv('REDIS_HOST')) { 'memcache.distributed' => '\OC\Memcache\Redis', 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( - 'host' => getenv('REDIS_HOST'), + 'host' => ($_ENV['REDIS_PROTOCOL'] ?? 'tcp') . "://" . getenv('REDIS_HOST'), 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/28/fpm-alpine/entrypoint.sh b/28/fpm-alpine/entrypoint.sh index 8e178f2e..ab4e9488 100755 --- a/28/fpm-alpine/entrypoint.sh +++ b/28/fpm-alpine/entrypoint.sh @@ -120,9 +120,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi # check if redis password has been set elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" fi echo "redis.session.locking_enabled = 1" echo "redis.session.lock_retries = -1" diff --git a/28/fpm/config/redis.config.php b/28/fpm/config/redis.config.php index a5b13da6..f9049924 100644 --- a/28/fpm/config/redis.config.php +++ b/28/fpm/config/redis.config.php @@ -4,7 +4,7 @@ if (getenv('REDIS_HOST')) { 'memcache.distributed' => '\OC\Memcache\Redis', 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( - 'host' => getenv('REDIS_HOST'), + 'host' => ($_ENV['REDIS_PROTOCOL'] ?? 'tcp') . "://" . getenv('REDIS_HOST'), 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/28/fpm/entrypoint.sh b/28/fpm/entrypoint.sh index 8e178f2e..ab4e9488 100755 --- a/28/fpm/entrypoint.sh +++ b/28/fpm/entrypoint.sh @@ -120,9 +120,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi # check if redis password has been set elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" fi echo "redis.session.locking_enabled = 1" echo "redis.session.lock_retries = -1" diff --git a/29/apache/config/redis.config.php b/29/apache/config/redis.config.php index a5b13da6..f9049924 100644 --- a/29/apache/config/redis.config.php +++ b/29/apache/config/redis.config.php @@ -4,7 +4,7 @@ if (getenv('REDIS_HOST')) { 'memcache.distributed' => '\OC\Memcache\Redis', 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( - 'host' => getenv('REDIS_HOST'), + 'host' => ($_ENV['REDIS_PROTOCOL'] ?? 'tcp') . "://" . getenv('REDIS_HOST'), 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/29/apache/entrypoint.sh b/29/apache/entrypoint.sh index 8e178f2e..ab4e9488 100755 --- a/29/apache/entrypoint.sh +++ b/29/apache/entrypoint.sh @@ -120,9 +120,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi # check if redis password has been set elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" fi echo "redis.session.locking_enabled = 1" echo "redis.session.lock_retries = -1" diff --git a/29/fpm-alpine/config/redis.config.php b/29/fpm-alpine/config/redis.config.php index a5b13da6..f9049924 100644 --- a/29/fpm-alpine/config/redis.config.php +++ b/29/fpm-alpine/config/redis.config.php @@ -4,7 +4,7 @@ if (getenv('REDIS_HOST')) { 'memcache.distributed' => '\OC\Memcache\Redis', 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( - 'host' => getenv('REDIS_HOST'), + 'host' => ($_ENV['REDIS_PROTOCOL'] ?? 'tcp') . "://" . getenv('REDIS_HOST'), 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/29/fpm-alpine/entrypoint.sh b/29/fpm-alpine/entrypoint.sh index 8e178f2e..ab4e9488 100755 --- a/29/fpm-alpine/entrypoint.sh +++ b/29/fpm-alpine/entrypoint.sh @@ -120,9 +120,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi # check if redis password has been set elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" fi echo "redis.session.locking_enabled = 1" echo "redis.session.lock_retries = -1" diff --git a/29/fpm/config/redis.config.php b/29/fpm/config/redis.config.php index a5b13da6..f9049924 100644 --- a/29/fpm/config/redis.config.php +++ b/29/fpm/config/redis.config.php @@ -4,7 +4,7 @@ if (getenv('REDIS_HOST')) { 'memcache.distributed' => '\OC\Memcache\Redis', 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( - 'host' => getenv('REDIS_HOST'), + 'host' => ($_ENV['REDIS_PROTOCOL'] ?? 'tcp') . "://" . getenv('REDIS_HOST'), 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/29/fpm/entrypoint.sh b/29/fpm/entrypoint.sh index 8e178f2e..ab4e9488 100755 --- a/29/fpm/entrypoint.sh +++ b/29/fpm/entrypoint.sh @@ -120,9 +120,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi # check if redis password has been set elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" fi echo "redis.session.locking_enabled = 1" echo "redis.session.lock_retries = -1" diff --git a/30/apache/config/redis.config.php b/30/apache/config/redis.config.php index a5b13da6..f9049924 100644 --- a/30/apache/config/redis.config.php +++ b/30/apache/config/redis.config.php @@ -4,7 +4,7 @@ if (getenv('REDIS_HOST')) { 'memcache.distributed' => '\OC\Memcache\Redis', 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( - 'host' => getenv('REDIS_HOST'), + 'host' => ($_ENV['REDIS_PROTOCOL'] ?? 'tcp') . "://" . getenv('REDIS_HOST'), 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/30/apache/entrypoint.sh b/30/apache/entrypoint.sh index 8e178f2e..ab4e9488 100755 --- a/30/apache/entrypoint.sh +++ b/30/apache/entrypoint.sh @@ -120,9 +120,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi # check if redis password has been set elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" fi echo "redis.session.locking_enabled = 1" echo "redis.session.lock_retries = -1" diff --git a/30/fpm-alpine/config/redis.config.php b/30/fpm-alpine/config/redis.config.php index a5b13da6..f9049924 100644 --- a/30/fpm-alpine/config/redis.config.php +++ b/30/fpm-alpine/config/redis.config.php @@ -4,7 +4,7 @@ if (getenv('REDIS_HOST')) { 'memcache.distributed' => '\OC\Memcache\Redis', 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( - 'host' => getenv('REDIS_HOST'), + 'host' => ($_ENV['REDIS_PROTOCOL'] ?? 'tcp') . "://" . getenv('REDIS_HOST'), 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/30/fpm-alpine/entrypoint.sh b/30/fpm-alpine/entrypoint.sh index 8e178f2e..ab4e9488 100755 --- a/30/fpm-alpine/entrypoint.sh +++ b/30/fpm-alpine/entrypoint.sh @@ -120,9 +120,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi # check if redis password has been set elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" fi echo "redis.session.locking_enabled = 1" echo "redis.session.lock_retries = -1" diff --git a/30/fpm/config/redis.config.php b/30/fpm/config/redis.config.php index a5b13da6..f9049924 100644 --- a/30/fpm/config/redis.config.php +++ b/30/fpm/config/redis.config.php @@ -4,7 +4,7 @@ if (getenv('REDIS_HOST')) { 'memcache.distributed' => '\OC\Memcache\Redis', 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( - 'host' => getenv('REDIS_HOST'), + 'host' => ($_ENV['REDIS_PROTOCOL'] ?? 'tcp') . "://" . getenv('REDIS_HOST'), 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/30/fpm/entrypoint.sh b/30/fpm/entrypoint.sh index 8e178f2e..ab4e9488 100755 --- a/30/fpm/entrypoint.sh +++ b/30/fpm/entrypoint.sh @@ -120,9 +120,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi # check if redis password has been set elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" fi echo "redis.session.locking_enabled = 1" echo "redis.session.lock_retries = -1" diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 8e178f2e..ab4e9488 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -120,9 +120,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi # check if redis password has been set elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\"" else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + echo "session.save_path = \"${REDIS_PROTOCOL:=tcp}://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" fi echo "redis.session.locking_enabled = 1" echo "redis.session.lock_retries = -1" From 08ac24880cc34d5e351bba72da219a99af253ba5 Mon Sep 17 00:00:00 2001 From: J0WI Date: Thu, 9 Jan 2025 23:01:21 +0000 Subject: [PATCH 2/4] Alpine 3.21 (#2360) --- 28/fpm-alpine/Dockerfile | 2 +- 29/fpm-alpine/Dockerfile | 2 +- 30/fpm-alpine/Dockerfile | 2 +- update.sh | 2 +- versions.json | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 02cd4a23..63569f89 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT: created by update.sh from Dockerfile-alpine.template -FROM php:8.2-fpm-alpine3.20 +FROM php:8.2-fpm-alpine3.21 # entrypoint.sh and cron.sh dependencies RUN set -ex; \ diff --git a/29/fpm-alpine/Dockerfile b/29/fpm-alpine/Dockerfile index 4e147a5c..6e4ea4d1 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT: created by update.sh from Dockerfile-alpine.template -FROM php:8.2-fpm-alpine3.20 +FROM php:8.2-fpm-alpine3.21 # entrypoint.sh and cron.sh dependencies RUN set -ex; \ diff --git a/30/fpm-alpine/Dockerfile b/30/fpm-alpine/Dockerfile index 52ea716c..9bd77015 100644 --- a/30/fpm-alpine/Dockerfile +++ b/30/fpm-alpine/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT: created by update.sh from Dockerfile-alpine.template -FROM php:8.2-fpm-alpine3.20 +FROM php:8.2-fpm-alpine3.21 # entrypoint.sh and cron.sh dependencies RUN set -ex; \ diff --git a/update.sh b/update.sh index 6e576238..89f3d6f2 100755 --- a/update.sh +++ b/update.sh @@ -2,7 +2,7 @@ set -eo pipefail declare -A alpine_version=( - [default]='3.20' + [default]='3.21' ) declare -A debian_version=( diff --git a/versions.json b/versions.json index ec8b3ca9..09f25557 100644 --- a/versions.json +++ b/versions.json @@ -20,7 +20,7 @@ "fpm-alpine": { "variant": "fpm-alpine", "base": "alpine", - "baseVersion": "3.20", + "baseVersion": "3.21", "phpVersion": "8.2" } } @@ -46,7 +46,7 @@ "fpm-alpine": { "variant": "fpm-alpine", "base": "alpine", - "baseVersion": "3.20", + "baseVersion": "3.21", "phpVersion": "8.2" } } @@ -72,7 +72,7 @@ "fpm-alpine": { "variant": "fpm-alpine", "base": "alpine", - "baseVersion": "3.20", + "baseVersion": "3.21", "phpVersion": "8.2" } } From 5b932e390ec39c57d5280e0fa531fbd7202d49ed Mon Sep 17 00:00:00 2001 From: Hagen <2806328+derhagen@users.noreply.github.com> Date: Sat, 11 Jan 2025 19:22:09 +0100 Subject: [PATCH 3/4] Add REDIS_HOST_USER variable to specify a redis user (#2359) Signed-off-by: hagene --- .config/redis.config.php | 4 ++++ README.md | 1 + 2 files changed, 5 insertions(+) diff --git a/.config/redis.config.php b/.config/redis.config.php index a5b13da6..2069812f 100644 --- a/.config/redis.config.php +++ b/.config/redis.config.php @@ -14,4 +14,8 @@ if (getenv('REDIS_HOST')) { } elseif (getenv('REDIS_HOST')[0] != '/') { $CONFIG['redis']['port'] = 6379; } + + if (getenv('REDIS_HOST_USER') !== false) { + $CONFIG['redis']['user'] = (string) getenv('REDIS_HOST_USER'); + } } diff --git a/README.md b/README.md index 6745faa3..6fdd5ec9 100644 --- a/README.md +++ b/README.md @@ -236,6 +236,7 @@ To use Redis for memory caching as well as PHP session storage, specify the foll - `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_USER` (not set by default) Optional username for Redis, only use for external Redis servers that require a user. - `REDIS_HOST_PASSWORD` (not set by default) Redis password Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html) for more information. From 7f707b6c5d1ded30317c4f38651b9538e879a8f0 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Sat, 11 Jan 2025 18:22:33 +0000 Subject: [PATCH 4/4] Runs update.sh --- 28/apache/config/redis.config.php | 4 ++++ 28/fpm-alpine/config/redis.config.php | 4 ++++ 28/fpm/config/redis.config.php | 4 ++++ 29/apache/config/redis.config.php | 4 ++++ 29/fpm-alpine/config/redis.config.php | 4 ++++ 29/fpm/config/redis.config.php | 4 ++++ 30/apache/config/redis.config.php | 4 ++++ 30/fpm-alpine/config/redis.config.php | 4 ++++ 30/fpm/config/redis.config.php | 4 ++++ 9 files changed, 36 insertions(+) diff --git a/28/apache/config/redis.config.php b/28/apache/config/redis.config.php index a5b13da6..2069812f 100644 --- a/28/apache/config/redis.config.php +++ b/28/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_HOST_USER') !== false) { + $CONFIG['redis']['user'] = (string) getenv('REDIS_HOST_USER'); + } } diff --git a/28/fpm-alpine/config/redis.config.php b/28/fpm-alpine/config/redis.config.php index a5b13da6..2069812f 100644 --- a/28/fpm-alpine/config/redis.config.php +++ b/28/fpm-alpine/config/redis.config.php @@ -14,4 +14,8 @@ if (getenv('REDIS_HOST')) { } elseif (getenv('REDIS_HOST')[0] != '/') { $CONFIG['redis']['port'] = 6379; } + + if (getenv('REDIS_HOST_USER') !== false) { + $CONFIG['redis']['user'] = (string) getenv('REDIS_HOST_USER'); + } } diff --git a/28/fpm/config/redis.config.php b/28/fpm/config/redis.config.php index a5b13da6..2069812f 100644 --- a/28/fpm/config/redis.config.php +++ b/28/fpm/config/redis.config.php @@ -14,4 +14,8 @@ if (getenv('REDIS_HOST')) { } elseif (getenv('REDIS_HOST')[0] != '/') { $CONFIG['redis']['port'] = 6379; } + + if (getenv('REDIS_HOST_USER') !== false) { + $CONFIG['redis']['user'] = (string) getenv('REDIS_HOST_USER'); + } } diff --git a/29/apache/config/redis.config.php b/29/apache/config/redis.config.php index a5b13da6..2069812f 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_HOST_USER') !== false) { + $CONFIG['redis']['user'] = (string) getenv('REDIS_HOST_USER'); + } } diff --git a/29/fpm-alpine/config/redis.config.php b/29/fpm-alpine/config/redis.config.php index a5b13da6..2069812f 100644 --- a/29/fpm-alpine/config/redis.config.php +++ b/29/fpm-alpine/config/redis.config.php @@ -14,4 +14,8 @@ if (getenv('REDIS_HOST')) { } elseif (getenv('REDIS_HOST')[0] != '/') { $CONFIG['redis']['port'] = 6379; } + + if (getenv('REDIS_HOST_USER') !== false) { + $CONFIG['redis']['user'] = (string) getenv('REDIS_HOST_USER'); + } } diff --git a/29/fpm/config/redis.config.php b/29/fpm/config/redis.config.php index a5b13da6..2069812f 100644 --- a/29/fpm/config/redis.config.php +++ b/29/fpm/config/redis.config.php @@ -14,4 +14,8 @@ if (getenv('REDIS_HOST')) { } elseif (getenv('REDIS_HOST')[0] != '/') { $CONFIG['redis']['port'] = 6379; } + + if (getenv('REDIS_HOST_USER') !== false) { + $CONFIG['redis']['user'] = (string) getenv('REDIS_HOST_USER'); + } } diff --git a/30/apache/config/redis.config.php b/30/apache/config/redis.config.php index a5b13da6..2069812f 100644 --- a/30/apache/config/redis.config.php +++ b/30/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_HOST_USER') !== false) { + $CONFIG['redis']['user'] = (string) getenv('REDIS_HOST_USER'); + } } diff --git a/30/fpm-alpine/config/redis.config.php b/30/fpm-alpine/config/redis.config.php index a5b13da6..2069812f 100644 --- a/30/fpm-alpine/config/redis.config.php +++ b/30/fpm-alpine/config/redis.config.php @@ -14,4 +14,8 @@ if (getenv('REDIS_HOST')) { } elseif (getenv('REDIS_HOST')[0] != '/') { $CONFIG['redis']['port'] = 6379; } + + if (getenv('REDIS_HOST_USER') !== false) { + $CONFIG['redis']['user'] = (string) getenv('REDIS_HOST_USER'); + } } diff --git a/30/fpm/config/redis.config.php b/30/fpm/config/redis.config.php index a5b13da6..2069812f 100644 --- a/30/fpm/config/redis.config.php +++ b/30/fpm/config/redis.config.php @@ -14,4 +14,8 @@ if (getenv('REDIS_HOST')) { } elseif (getenv('REDIS_HOST')[0] != '/') { $CONFIG['redis']['port'] = 6379; } + + if (getenv('REDIS_HOST_USER') !== false) { + $CONFIG['redis']['user'] = (string) getenv('REDIS_HOST_USER'); + } }