From 73c73bfd155de0cee3f945777519b057d2e41bbc Mon Sep 17 00:00:00 2001 From: Spyderfoo <36179436+neokyx@users.noreply.github.com> Date: Tue, 17 Dec 2024 09:28:21 +0100 Subject: [PATCH 1/7] Update Dockerfile Php The PHP OPcache module is not properly configured. The OPcache buffer is nearly full. To assure that all scripts can be hold in cache, it is recommended to apply "opcache.memory_consumption" to your PHP configuration with a value higher than "128" Signed-off-by: Spyderfoo <36179436+neokyx@users.noreply.github.com> --- 30/apache/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/30/apache/Dockerfile b/30/apache/Dockerfile index 73ac6ccc..1ff4134c 100644 --- a/30/apache/Dockerfile +++ b/30/apache/Dockerfile @@ -98,7 +98,7 @@ RUN { \ echo 'opcache.enable=1'; \ echo 'opcache.interned_strings_buffer=32'; \ echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ + echo 'opcache.memory_consumption=256'; \ echo 'opcache.save_comments=1'; \ echo 'opcache.revalidate_freq=60'; \ echo 'opcache.jit=1255'; \ From 04c7e74becb46a8941c37f5bc381c117d05edd8d Mon Sep 17 00:00:00 2001 From: Spyderfoo <36179436+neokyx@users.noreply.github.com> Date: Tue, 17 Dec 2024 09:34:30 +0100 Subject: [PATCH 2/7] Update Dockerfile Suggesting (#line 101) to improve opcache.memory_consumption to value 256 instead of 128, in order to avoid the following recurrent warning, even when a rather light Nextcloud installation, with very few (4/5) apps is used. ``` "The PHP OPcache module is not properly configured. The OPcache buffer is nearly full. To assure that all scripts can be hold in cache, it is recommended to apply "opcache.memory_consumption" to your PHP configuration with a value higher than "128". ``` Signed-off-by: Spyderfoo <36179436+neokyx@users.noreply.github.com> --- 30/fpm-alpine/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/30/fpm-alpine/Dockerfile b/30/fpm-alpine/Dockerfile index 52ea716c..0d7f37d1 100644 --- a/30/fpm-alpine/Dockerfile +++ b/30/fpm-alpine/Dockerfile @@ -93,7 +93,7 @@ RUN { \ echo 'opcache.enable=1'; \ echo 'opcache.interned_strings_buffer=32'; \ echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ + echo 'opcache.memory_consumption=256'; \ echo 'opcache.save_comments=1'; \ echo 'opcache.revalidate_freq=60'; \ echo 'opcache.jit=1255'; \ From 889427d743f4d0b85c9d3de87cad734665bba830 Mon Sep 17 00:00:00 2001 From: Spyderfoo <36179436+neokyx@users.noreply.github.com> Date: Tue, 17 Dec 2024 09:37:49 +0100 Subject: [PATCH 3/7] Update Dockerfile Signed-off-by: Spyderfoo <36179436+neokyx@users.noreply.github.com> --- 30/fpm/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/30/fpm/Dockerfile b/30/fpm/Dockerfile index dfe49612..10de8dad 100644 --- a/30/fpm/Dockerfile +++ b/30/fpm/Dockerfile @@ -98,7 +98,7 @@ RUN { \ echo 'opcache.enable=1'; \ echo 'opcache.interned_strings_buffer=32'; \ echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ + echo 'opcache.memory_consumption=256'; \ echo 'opcache.save_comments=1'; \ echo 'opcache.revalidate_freq=60'; \ echo 'opcache.jit=1255'; \ From 13e24519a258596f888ce3ca236f872a85413042 Mon Sep 17 00:00:00 2001 From: neokyx <36179436+neokyx@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:48:58 +0100 Subject: [PATCH 4/7] Update Dockerfile-debian.template opcache mem consump 128 > 512 Signed-off-by: neokyx <36179436+neokyx@users.noreply.github.com> --- Dockerfile-debian.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 8b66dd34..9a7336bc 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -97,7 +97,7 @@ RUN { \ echo 'opcache.enable=1'; \ echo 'opcache.interned_strings_buffer=32'; \ echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ + echo 'opcache.memory_consumption=512'; \ echo 'opcache.save_comments=1'; \ echo 'opcache.revalidate_freq=60'; \ echo 'opcache.jit=1255'; \ From 351e81f6d2136bf27dbe7c70dea00b4bb1839629 Mon Sep 17 00:00:00 2001 From: neokyx <36179436+neokyx@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:02:55 +0100 Subject: [PATCH 5/7] Update Dockerfile + apt upgrade Signed-off-by: neokyx <36179436+neokyx@users.noreply.github.com> --- 30/apache/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/30/apache/Dockerfile b/30/apache/Dockerfile index 1ff4134c..6f57c148 100644 --- a/30/apache/Dockerfile +++ b/30/apache/Dockerfile @@ -89,7 +89,7 @@ RUN set -ex; \ | sort -u \ | xargs -rt apt-mark manual; \ \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + apt-get upgrade -y && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/* # set recommended PHP.ini settings @@ -164,7 +164,7 @@ RUN set -ex; \ mkdir -p /usr/src/nextcloud/custom_apps; \ chmod +x /usr/src/nextcloud/occ; \ \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \ + apt-get upgrade -y && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \ rm -rf /var/lib/apt/lists/* COPY *.sh upgrade.exclude / 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 6/7] 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 7/7] 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'); + } }