From f756178d101326aa09d5494796fbaa35d76deaa7 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Sat, 8 Feb 2025 08:17:07 -0800 Subject: [PATCH 1/2] Allow REDIS_CLUSTER environment variable to use Redis in cluster mode Signed-off-by: Nick Martin <284356+n1mmy@users.noreply.github.com> Signed-off-by: Nick Martin --- README.md | 4 ++++ docker-entrypoint.sh | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/README.md b/README.md index 6745faa3..0c5b0f05 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,10 @@ To use Redis for memory caching as well as PHP session storage, specify the foll - `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 +To use Redis in cluster mode, you can use + +- `REDIS_CLUSTER` (not set by default) Name and port number of a redis host. + Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html) for more information. ### E-mail (SMTP) Configuration diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 8e178f2e..61551869 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -132,6 +132,26 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP } > /usr/local/etc/php/conf.d/redis-session.ini fi + if [ -n "${REDIS_CLUSTER+x}" ]; then + + echo "Configuring Rediscluster as session handler" + { + file_env REDIS_HOST_PASSWORD + echo 'session.save_handler = rediscluster' + # check if redis password has been set + if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then + echo "session.save_path = \"seed[]=${REDIS_CLUSTER}&auth=${REDIS_HOST_PASSWORD}\"" + else + echo "session.save_path = \"seed[]=${REDIS_CLUSTER}\"" + fi + echo "redis.session.locking_enabled = 1" + echo "redis.session.lock_retries = -1" + # redis.session.lock_wait_time is specified in microseconds. + # Wait 10ms before retrying the lock rather than the default 2ms. + echo "redis.session.lock_wait_time = 10000" + } > /usr/local/etc/php/conf.d/redis-session.ini + fi + # If another process is syncing the html folder, wait for # it to be done, then escape initalization. ( From 4f691770aee32e738f9c3d2639538f644b0c5728 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Thu, 13 Feb 2025 19:43:06 +0000 Subject: [PATCH 2/2] Runs update.sh --- 29/apache/Dockerfile | 6 +++--- 29/fpm-alpine/Dockerfile | 6 +++--- 29/fpm/Dockerfile | 6 +++--- 30/apache/Dockerfile | 6 +++--- 30/fpm-alpine/Dockerfile | 6 +++--- 30/fpm/Dockerfile | 6 +++--- latest.txt | 2 +- versions.json | 12 ++++++------ 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/29/apache/Dockerfile b/29/apache/Dockerfile index 19c0781c..4aec7fe7 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -150,7 +150,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 29.0.11 +ENV NEXTCLOUD_VERSION 29.0.12 RUN set -ex; \ fetchDeps=" \ @@ -160,8 +160,8 @@ RUN set -ex; \ apt-get update; \ apt-get install -y --no-install-recommends $fetchDeps; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.11.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.11.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.12.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.12.tar.bz2.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ # gpg key from https://nextcloud.com/nextcloud.asc gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ diff --git a/29/fpm-alpine/Dockerfile b/29/fpm-alpine/Dockerfile index bdec7b10..7eec3144 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -130,7 +130,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.11 +ENV NEXTCLOUD_VERSION 29.0.12 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -138,8 +138,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.11.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.11.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.12.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.12.tar.bz2.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ # gpg key from https://nextcloud.com/nextcloud.asc gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ diff --git a/29/fpm/Dockerfile b/29/fpm/Dockerfile index ae7c527c..819fd601 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -135,7 +135,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.11 +ENV NEXTCLOUD_VERSION 29.0.12 RUN set -ex; \ fetchDeps=" \ @@ -145,8 +145,8 @@ RUN set -ex; \ apt-get update; \ apt-get install -y --no-install-recommends $fetchDeps; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.11.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.11.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.12.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.12.tar.bz2.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ # gpg key from https://nextcloud.com/nextcloud.asc gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ diff --git a/30/apache/Dockerfile b/30/apache/Dockerfile index 4334e170..3bb31915 100644 --- a/30/apache/Dockerfile +++ b/30/apache/Dockerfile @@ -150,7 +150,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 30.0.5 +ENV NEXTCLOUD_VERSION 30.0.6 RUN set -ex; \ fetchDeps=" \ @@ -160,8 +160,8 @@ RUN set -ex; \ apt-get update; \ apt-get install -y --no-install-recommends $fetchDeps; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.5.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.5.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.6.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.6.tar.bz2.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ # gpg key from https://nextcloud.com/nextcloud.asc gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ diff --git a/30/fpm-alpine/Dockerfile b/30/fpm-alpine/Dockerfile index 6ca9bda9..7ad94ea2 100644 --- a/30/fpm-alpine/Dockerfile +++ b/30/fpm-alpine/Dockerfile @@ -130,7 +130,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 30.0.5 +ENV NEXTCLOUD_VERSION 30.0.6 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -138,8 +138,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.5.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.5.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.6.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.6.tar.bz2.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ # gpg key from https://nextcloud.com/nextcloud.asc gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ diff --git a/30/fpm/Dockerfile b/30/fpm/Dockerfile index f13ce297..c904d52e 100644 --- a/30/fpm/Dockerfile +++ b/30/fpm/Dockerfile @@ -135,7 +135,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 30.0.5 +ENV NEXTCLOUD_VERSION 30.0.6 RUN set -ex; \ fetchDeps=" \ @@ -145,8 +145,8 @@ RUN set -ex; \ apt-get update; \ apt-get install -y --no-install-recommends $fetchDeps; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.5.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.5.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.6.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.6.tar.bz2.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ # gpg key from https://nextcloud.com/nextcloud.asc gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ diff --git a/latest.txt b/latest.txt index bd980c38..1c07a42c 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -30.0.5 +30.0.6 diff --git a/versions.json b/versions.json index 6acda383..6a9ce73a 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "30": { "branch": "30", - "version": "30.0.5", - "url": "https://download.nextcloud.com/server/releases/nextcloud-30.0.5.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-30.0.5.tar.bz2.asc", + "version": "30.0.6", + "url": "https://download.nextcloud.com/server/releases/nextcloud-30.0.6.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-30.0.6.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -27,9 +27,9 @@ }, "29": { "branch": "29", - "version": "29.0.11", - "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.11.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.11.tar.bz2.asc", + "version": "29.0.12", + "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.12.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.12.tar.bz2.asc", "variants": { "apache": { "variant": "apache",