From 4c24a2ae8ed0b1c6dff7aeddb6fb2d8e07d87f3e Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Thu, 26 Oct 2023 20:01:40 +0000 Subject: [PATCH 001/123] Runs update.sh --- 25/apache/Dockerfile | 6 +++--- 25/fpm-alpine/Dockerfile | 6 +++--- 25/fpm/Dockerfile | 6 +++--- 26/apache/Dockerfile | 6 +++--- 26/fpm-alpine/Dockerfile | 6 +++--- 26/fpm/Dockerfile | 6 +++--- 27/apache/Dockerfile | 6 +++--- 27/fpm-alpine/Dockerfile | 6 +++--- 27/fpm/Dockerfile | 6 +++--- latest.txt | 2 +- versions.json | 18 +++++++++--------- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/25/apache/Dockerfile b/25/apache/Dockerfile index 2c27d014..6dd11cd4 100644 --- a/25/apache/Dockerfile +++ b/25/apache/Dockerfile @@ -137,7 +137,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 25.0.12 +ENV NEXTCLOUD_VERSION 25.0.13 RUN set -ex; \ fetchDeps=" \ @@ -147,8 +147,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-25.0.12.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-25.0.12.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.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/25/fpm-alpine/Dockerfile b/25/fpm-alpine/Dockerfile index f3babd46..30600fe7 100644 --- a/25/fpm-alpine/Dockerfile +++ b/25/fpm-alpine/Dockerfile @@ -110,7 +110,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 25.0.12 +ENV NEXTCLOUD_VERSION 25.0.13 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -118,8 +118,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-25.0.12.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-25.0.12.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.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/25/fpm/Dockerfile b/25/fpm/Dockerfile index 910f54d3..8ee3f364 100644 --- a/25/fpm/Dockerfile +++ b/25/fpm/Dockerfile @@ -122,7 +122,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 25.0.12 +ENV NEXTCLOUD_VERSION 25.0.13 RUN set -ex; \ fetchDeps=" \ @@ -132,8 +132,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-25.0.12.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-25.0.12.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.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/26/apache/Dockerfile b/26/apache/Dockerfile index a6b125cf..ad2b096b 100644 --- a/26/apache/Dockerfile +++ b/26/apache/Dockerfile @@ -138,7 +138,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 26.0.7 +ENV NEXTCLOUD_VERSION 26.0.8 RUN set -ex; \ fetchDeps=" \ @@ -148,8 +148,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-26.0.7.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.7.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.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/26/fpm-alpine/Dockerfile b/26/fpm-alpine/Dockerfile index 3f29c2af..ed13e97c 100644 --- a/26/fpm-alpine/Dockerfile +++ b/26/fpm-alpine/Dockerfile @@ -111,7 +111,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 26.0.7 +ENV NEXTCLOUD_VERSION 26.0.8 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -119,8 +119,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.7.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.7.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.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/26/fpm/Dockerfile b/26/fpm/Dockerfile index e3608e6e..a0b361e6 100644 --- a/26/fpm/Dockerfile +++ b/26/fpm/Dockerfile @@ -123,7 +123,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 26.0.7 +ENV NEXTCLOUD_VERSION 26.0.8 RUN set -ex; \ fetchDeps=" \ @@ -133,8 +133,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-26.0.7.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.7.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.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/27/apache/Dockerfile b/27/apache/Dockerfile index 5fb93a29..8456bfc3 100644 --- a/27/apache/Dockerfile +++ b/27/apache/Dockerfile @@ -138,7 +138,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 27.1.2 +ENV NEXTCLOUD_VERSION 27.1.3 RUN set -ex; \ fetchDeps=" \ @@ -148,8 +148,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-27.1.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.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/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index be62ce5b..f9b2db70 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -111,7 +111,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.2 +ENV NEXTCLOUD_VERSION 27.1.3 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -119,8 +119,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.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/27/fpm/Dockerfile b/27/fpm/Dockerfile index d183f371..c445ce84 100644 --- a/27/fpm/Dockerfile +++ b/27/fpm/Dockerfile @@ -123,7 +123,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.2 +ENV NEXTCLOUD_VERSION 27.1.3 RUN set -ex; \ fetchDeps=" \ @@ -133,8 +133,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-27.1.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.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 c859fa17..3512630d 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -27.1.2 +27.1.3 diff --git a/versions.json b/versions.json index dbf3f613..1984f0ef 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "27": { "branch": "27", - "version": "27.1.2", - "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.2.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.2.tar.bz2.asc", + "version": "27.1.3", + "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -27,9 +27,9 @@ }, "26": { "branch": "26", - "version": "26.0.7", - "url": "https://download.nextcloud.com/server/releases/nextcloud-26.0.7.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-26.0.7.tar.bz2.asc", + "version": "26.0.8", + "url": "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -53,9 +53,9 @@ }, "25": { "branch": "25", - "version": "25.0.12", - "url": "https://download.nextcloud.com/server/releases/nextcloud-25.0.12.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-25.0.12.tar.bz2.asc", + "version": "25.0.13", + "url": "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From 37ee8cfdab231703b1adb5fa20abaeceec1b95cc Mon Sep 17 00:00:00 2001 From: J0WI Date: Thu, 26 Oct 2023 20:27:45 +0000 Subject: [PATCH 002/123] Bump to 27.1.3 Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 6e3aff56..0a880544 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='27.1.2' +stable_channel='27.1.3' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From 8a08d4191cfa15a4ae277cd6ef5ea923aae44176 Mon Sep 17 00:00:00 2001 From: Josh Richards Date: Fri, 10 Nov 2023 13:21:24 -0500 Subject: [PATCH 003/123] Issue template: Reminder to include Compose/run + config (#2088) Reports often come in lacking Compose files or run commands. Same goes for `config.php`. Signed-off-by: Josh Richards --- .github/ISSUE_TEMPLATE/Image_issue.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Image_issue.md b/.github/ISSUE_TEMPLATE/Image_issue.md index 5ab4ad0b..725fca88 100644 --- a/.github/ISSUE_TEMPLATE/Image_issue.md +++ b/.github/ISSUE_TEMPLATE/Image_issue.md @@ -6,7 +6,9 @@ about: Issues related to the Nextcloud Docker image From aaadffffb3e295d6ddb58a599b38c6c0add5986e Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Sun, 12 Nov 2023 00:34:24 +0000 Subject: [PATCH 004/123] Runs update.sh --- 25/apache/Dockerfile | 2 +- 25/fpm-alpine/Dockerfile | 2 +- 25/fpm/Dockerfile | 2 +- 26/apache/Dockerfile | 2 +- 26/fpm-alpine/Dockerfile | 2 +- 26/fpm/Dockerfile | 2 +- 27/apache/Dockerfile | 2 +- 27/fpm-alpine/Dockerfile | 2 +- 27/fpm/Dockerfile | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/25/apache/Dockerfile b/25/apache/Dockerfile index 6dd11cd4..9e9d448f 100644 --- a/25/apache/Dockerfile +++ b/25/apache/Dockerfile @@ -62,7 +62,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.22; \ + pecl install APCu-5.1.23; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/25/fpm-alpine/Dockerfile b/25/fpm-alpine/Dockerfile index 30600fe7..a9d019c6 100644 --- a/25/fpm-alpine/Dockerfile +++ b/25/fpm-alpine/Dockerfile @@ -53,7 +53,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.22; \ + pecl install APCu-5.1.23; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/25/fpm/Dockerfile b/25/fpm/Dockerfile index 8ee3f364..b9794e93 100644 --- a/25/fpm/Dockerfile +++ b/25/fpm/Dockerfile @@ -62,7 +62,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.22; \ + pecl install APCu-5.1.23; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/26/apache/Dockerfile b/26/apache/Dockerfile index ad2b096b..b7f7fa80 100644 --- a/26/apache/Dockerfile +++ b/26/apache/Dockerfile @@ -63,7 +63,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.22; \ + pecl install APCu-5.1.23; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/26/fpm-alpine/Dockerfile b/26/fpm-alpine/Dockerfile index ed13e97c..fee452d8 100644 --- a/26/fpm-alpine/Dockerfile +++ b/26/fpm-alpine/Dockerfile @@ -54,7 +54,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.22; \ + pecl install APCu-5.1.23; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/26/fpm/Dockerfile b/26/fpm/Dockerfile index a0b361e6..1b4ce5ef 100644 --- a/26/fpm/Dockerfile +++ b/26/fpm/Dockerfile @@ -63,7 +63,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.22; \ + pecl install APCu-5.1.23; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/27/apache/Dockerfile b/27/apache/Dockerfile index 8456bfc3..36576329 100644 --- a/27/apache/Dockerfile +++ b/27/apache/Dockerfile @@ -63,7 +63,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.22; \ + pecl install APCu-5.1.23; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index f9b2db70..66e5df1d 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -54,7 +54,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.22; \ + pecl install APCu-5.1.23; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/27/fpm/Dockerfile b/27/fpm/Dockerfile index c445ce84..34ab45c5 100644 --- a/27/fpm/Dockerfile +++ b/27/fpm/Dockerfile @@ -63,7 +63,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.22; \ + pecl install APCu-5.1.23; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ From 3cbec37106a788774137ae8ae3d2a6dcf984b942 Mon Sep 17 00:00:00 2001 From: Marcel <34819524+MarcelCoding@users.noreply.github.com> Date: Tue, 14 Nov 2023 23:40:54 +0100 Subject: [PATCH 005/123] Add crond log level environment variable (#1805) * Update docker-cron.sh Signed-off-by: Marcel <34819524+MarcelCoding@users.noreply.github.com> * Update stack.yml Signed-off-by: Marcel <34819524+MarcelCoding@users.noreply.github.com> * Update docker-cron.sh * Update docker-cron.sh Signed-off-by: Marcel <34819524+MarcelCoding@users.noreply.github.com> * Update stack.yml Signed-off-by: Marcel <34819524+MarcelCoding@users.noreply.github.com> --------- Signed-off-by: Marcel <34819524+MarcelCoding@users.noreply.github.com> --- docker-cron.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-cron.sh b/docker-cron.sh index 4dfa4118..b4cd9af6 100755 --- a/docker-cron.sh +++ b/docker-cron.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -exec busybox crond -f -l 0 -L /dev/stdout +exec busybox crond -f -L /dev/stdout From 2bfad535438ec74046e86def0d737a967c45ce1a Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Tue, 14 Nov 2023 22:41:10 +0000 Subject: [PATCH 006/123] Runs update.sh --- 25/apache/cron.sh | 2 +- 25/fpm-alpine/cron.sh | 2 +- 25/fpm/cron.sh | 2 +- 26/apache/cron.sh | 2 +- 26/fpm-alpine/cron.sh | 2 +- 26/fpm/cron.sh | 2 +- 27/apache/cron.sh | 2 +- 27/fpm-alpine/cron.sh | 2 +- 27/fpm/cron.sh | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/25/apache/cron.sh b/25/apache/cron.sh index 4dfa4118..b4cd9af6 100755 --- a/25/apache/cron.sh +++ b/25/apache/cron.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -exec busybox crond -f -l 0 -L /dev/stdout +exec busybox crond -f -L /dev/stdout diff --git a/25/fpm-alpine/cron.sh b/25/fpm-alpine/cron.sh index 4dfa4118..b4cd9af6 100755 --- a/25/fpm-alpine/cron.sh +++ b/25/fpm-alpine/cron.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -exec busybox crond -f -l 0 -L /dev/stdout +exec busybox crond -f -L /dev/stdout diff --git a/25/fpm/cron.sh b/25/fpm/cron.sh index 4dfa4118..b4cd9af6 100755 --- a/25/fpm/cron.sh +++ b/25/fpm/cron.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -exec busybox crond -f -l 0 -L /dev/stdout +exec busybox crond -f -L /dev/stdout diff --git a/26/apache/cron.sh b/26/apache/cron.sh index 4dfa4118..b4cd9af6 100755 --- a/26/apache/cron.sh +++ b/26/apache/cron.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -exec busybox crond -f -l 0 -L /dev/stdout +exec busybox crond -f -L /dev/stdout diff --git a/26/fpm-alpine/cron.sh b/26/fpm-alpine/cron.sh index 4dfa4118..b4cd9af6 100755 --- a/26/fpm-alpine/cron.sh +++ b/26/fpm-alpine/cron.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -exec busybox crond -f -l 0 -L /dev/stdout +exec busybox crond -f -L /dev/stdout diff --git a/26/fpm/cron.sh b/26/fpm/cron.sh index 4dfa4118..b4cd9af6 100755 --- a/26/fpm/cron.sh +++ b/26/fpm/cron.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -exec busybox crond -f -l 0 -L /dev/stdout +exec busybox crond -f -L /dev/stdout diff --git a/27/apache/cron.sh b/27/apache/cron.sh index 4dfa4118..b4cd9af6 100755 --- a/27/apache/cron.sh +++ b/27/apache/cron.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -exec busybox crond -f -l 0 -L /dev/stdout +exec busybox crond -f -L /dev/stdout diff --git a/27/fpm-alpine/cron.sh b/27/fpm-alpine/cron.sh index 4dfa4118..b4cd9af6 100755 --- a/27/fpm-alpine/cron.sh +++ b/27/fpm-alpine/cron.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -exec busybox crond -f -l 0 -L /dev/stdout +exec busybox crond -f -L /dev/stdout diff --git a/27/fpm/cron.sh b/27/fpm/cron.sh index 4dfa4118..b4cd9af6 100755 --- a/27/fpm/cron.sh +++ b/27/fpm/cron.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -exec busybox crond -f -l 0 -L /dev/stdout +exec busybox crond -f -L /dev/stdout From 23d099bc33d5252e03d1ccb3b803f3c51beab9fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20V=C3=A6rum?= <6872940+dvaerum@users.noreply.github.com> Date: Wed, 15 Nov 2023 00:11:10 +0100 Subject: [PATCH 007/123] Bug fix: not found error if hook folder contains files but non ending with `*.sh` (#2095) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use `find` to located `*.sh` Signed-off-by: Dennis Vestergaard Værum * added msg if hook folder does not exist Signed-off-by: Dennis Vestergaard Værum * Updated info message Co-authored-by: J0WI Signed-off-by: Dennis Værum <6872940+dvaerum@users.noreply.github.com> * Update docker-entrypoint.sh Small adjustments Signed-off-by: Dennis Værum <6872940+dvaerum@users.noreply.github.com> --------- Signed-off-by: Dennis Vestergaard Værum Signed-off-by: Dennis Værum <6872940+dvaerum@users.noreply.github.com> Co-authored-by: J0WI --- docker-entrypoint.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 4c85f6ad..edb539a0 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -24,17 +24,17 @@ run_path() { local hook_folder_path="/docker-entrypoint-hooks.d/$1" local return_code=0 - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - if [ -z "$(ls -A "${hook_folder_path}")" ]; then - echo "==> but the hook folder \"$(basename "${hook_folder_path}")\" is empty, so nothing to do" + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" return 0 fi + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + ( - for script_file_path in "${hook_folder_path}/"*.sh; do - if ! [ -x "${script_file_path}" ] && [ -f "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" in the folder \"${hook_folder_path}\" was skipping, because it didn't have the executable flag" + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue fi From cd0562ba8cda9f4afe814e406c6120e863001c91 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Tue, 14 Nov 2023 23:11:32 +0000 Subject: [PATCH 008/123] Runs update.sh --- 25/apache/entrypoint.sh | 14 +++++++------- 25/fpm-alpine/entrypoint.sh | 14 +++++++------- 25/fpm/entrypoint.sh | 14 +++++++------- 26/apache/entrypoint.sh | 14 +++++++------- 26/fpm-alpine/entrypoint.sh | 14 +++++++------- 26/fpm/entrypoint.sh | 14 +++++++------- 27/apache/entrypoint.sh | 14 +++++++------- 27/fpm-alpine/entrypoint.sh | 14 +++++++------- 27/fpm/entrypoint.sh | 14 +++++++------- 9 files changed, 63 insertions(+), 63 deletions(-) diff --git a/25/apache/entrypoint.sh b/25/apache/entrypoint.sh index 4c85f6ad..edb539a0 100755 --- a/25/apache/entrypoint.sh +++ b/25/apache/entrypoint.sh @@ -24,17 +24,17 @@ run_path() { local hook_folder_path="/docker-entrypoint-hooks.d/$1" local return_code=0 - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - if [ -z "$(ls -A "${hook_folder_path}")" ]; then - echo "==> but the hook folder \"$(basename "${hook_folder_path}")\" is empty, so nothing to do" + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" return 0 fi + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + ( - for script_file_path in "${hook_folder_path}/"*.sh; do - if ! [ -x "${script_file_path}" ] && [ -f "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" in the folder \"${hook_folder_path}\" was skipping, because it didn't have the executable flag" + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue fi diff --git a/25/fpm-alpine/entrypoint.sh b/25/fpm-alpine/entrypoint.sh index 4c85f6ad..edb539a0 100755 --- a/25/fpm-alpine/entrypoint.sh +++ b/25/fpm-alpine/entrypoint.sh @@ -24,17 +24,17 @@ run_path() { local hook_folder_path="/docker-entrypoint-hooks.d/$1" local return_code=0 - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - if [ -z "$(ls -A "${hook_folder_path}")" ]; then - echo "==> but the hook folder \"$(basename "${hook_folder_path}")\" is empty, so nothing to do" + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" return 0 fi + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + ( - for script_file_path in "${hook_folder_path}/"*.sh; do - if ! [ -x "${script_file_path}" ] && [ -f "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" in the folder \"${hook_folder_path}\" was skipping, because it didn't have the executable flag" + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue fi diff --git a/25/fpm/entrypoint.sh b/25/fpm/entrypoint.sh index 4c85f6ad..edb539a0 100755 --- a/25/fpm/entrypoint.sh +++ b/25/fpm/entrypoint.sh @@ -24,17 +24,17 @@ run_path() { local hook_folder_path="/docker-entrypoint-hooks.d/$1" local return_code=0 - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - if [ -z "$(ls -A "${hook_folder_path}")" ]; then - echo "==> but the hook folder \"$(basename "${hook_folder_path}")\" is empty, so nothing to do" + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" return 0 fi + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + ( - for script_file_path in "${hook_folder_path}/"*.sh; do - if ! [ -x "${script_file_path}" ] && [ -f "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" in the folder \"${hook_folder_path}\" was skipping, because it didn't have the executable flag" + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue fi diff --git a/26/apache/entrypoint.sh b/26/apache/entrypoint.sh index 4c85f6ad..edb539a0 100755 --- a/26/apache/entrypoint.sh +++ b/26/apache/entrypoint.sh @@ -24,17 +24,17 @@ run_path() { local hook_folder_path="/docker-entrypoint-hooks.d/$1" local return_code=0 - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - if [ -z "$(ls -A "${hook_folder_path}")" ]; then - echo "==> but the hook folder \"$(basename "${hook_folder_path}")\" is empty, so nothing to do" + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" return 0 fi + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + ( - for script_file_path in "${hook_folder_path}/"*.sh; do - if ! [ -x "${script_file_path}" ] && [ -f "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" in the folder \"${hook_folder_path}\" was skipping, because it didn't have the executable flag" + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue fi diff --git a/26/fpm-alpine/entrypoint.sh b/26/fpm-alpine/entrypoint.sh index 4c85f6ad..edb539a0 100755 --- a/26/fpm-alpine/entrypoint.sh +++ b/26/fpm-alpine/entrypoint.sh @@ -24,17 +24,17 @@ run_path() { local hook_folder_path="/docker-entrypoint-hooks.d/$1" local return_code=0 - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - if [ -z "$(ls -A "${hook_folder_path}")" ]; then - echo "==> but the hook folder \"$(basename "${hook_folder_path}")\" is empty, so nothing to do" + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" return 0 fi + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + ( - for script_file_path in "${hook_folder_path}/"*.sh; do - if ! [ -x "${script_file_path}" ] && [ -f "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" in the folder \"${hook_folder_path}\" was skipping, because it didn't have the executable flag" + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue fi diff --git a/26/fpm/entrypoint.sh b/26/fpm/entrypoint.sh index 4c85f6ad..edb539a0 100755 --- a/26/fpm/entrypoint.sh +++ b/26/fpm/entrypoint.sh @@ -24,17 +24,17 @@ run_path() { local hook_folder_path="/docker-entrypoint-hooks.d/$1" local return_code=0 - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - if [ -z "$(ls -A "${hook_folder_path}")" ]; then - echo "==> but the hook folder \"$(basename "${hook_folder_path}")\" is empty, so nothing to do" + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" return 0 fi + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + ( - for script_file_path in "${hook_folder_path}/"*.sh; do - if ! [ -x "${script_file_path}" ] && [ -f "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" in the folder \"${hook_folder_path}\" was skipping, because it didn't have the executable flag" + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue fi diff --git a/27/apache/entrypoint.sh b/27/apache/entrypoint.sh index 4c85f6ad..edb539a0 100755 --- a/27/apache/entrypoint.sh +++ b/27/apache/entrypoint.sh @@ -24,17 +24,17 @@ run_path() { local hook_folder_path="/docker-entrypoint-hooks.d/$1" local return_code=0 - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - if [ -z "$(ls -A "${hook_folder_path}")" ]; then - echo "==> but the hook folder \"$(basename "${hook_folder_path}")\" is empty, so nothing to do" + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" return 0 fi + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + ( - for script_file_path in "${hook_folder_path}/"*.sh; do - if ! [ -x "${script_file_path}" ] && [ -f "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" in the folder \"${hook_folder_path}\" was skipping, because it didn't have the executable flag" + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue fi diff --git a/27/fpm-alpine/entrypoint.sh b/27/fpm-alpine/entrypoint.sh index 4c85f6ad..edb539a0 100755 --- a/27/fpm-alpine/entrypoint.sh +++ b/27/fpm-alpine/entrypoint.sh @@ -24,17 +24,17 @@ run_path() { local hook_folder_path="/docker-entrypoint-hooks.d/$1" local return_code=0 - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - if [ -z "$(ls -A "${hook_folder_path}")" ]; then - echo "==> but the hook folder \"$(basename "${hook_folder_path}")\" is empty, so nothing to do" + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" return 0 fi + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + ( - for script_file_path in "${hook_folder_path}/"*.sh; do - if ! [ -x "${script_file_path}" ] && [ -f "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" in the folder \"${hook_folder_path}\" was skipping, because it didn't have the executable flag" + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue fi diff --git a/27/fpm/entrypoint.sh b/27/fpm/entrypoint.sh index 4c85f6ad..edb539a0 100755 --- a/27/fpm/entrypoint.sh +++ b/27/fpm/entrypoint.sh @@ -24,17 +24,17 @@ run_path() { local hook_folder_path="/docker-entrypoint-hooks.d/$1" local return_code=0 - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - if [ -z "$(ls -A "${hook_folder_path}")" ]; then - echo "==> but the hook folder \"$(basename "${hook_folder_path}")\" is empty, so nothing to do" + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" return 0 fi + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + ( - for script_file_path in "${hook_folder_path}/"*.sh; do - if ! [ -x "${script_file_path}" ] && [ -f "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" in the folder \"${hook_folder_path}\" was skipping, because it didn't have the executable flag" + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue fi From 44e01e1eab2160bce02686797a51f81a3a021551 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Fri, 24 Nov 2023 00:27:31 +0000 Subject: [PATCH 009/123] Runs update.sh --- 26/apache/Dockerfile | 6 +++--- 26/fpm-alpine/Dockerfile | 6 +++--- 26/fpm/Dockerfile | 6 +++--- 27/apache/Dockerfile | 6 +++--- 27/fpm-alpine/Dockerfile | 6 +++--- 27/fpm/Dockerfile | 6 +++--- latest.txt | 2 +- versions.json | 12 ++++++------ 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/26/apache/Dockerfile b/26/apache/Dockerfile index b7f7fa80..c87c35a5 100644 --- a/26/apache/Dockerfile +++ b/26/apache/Dockerfile @@ -138,7 +138,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 26.0.8 +ENV NEXTCLOUD_VERSION 26.0.9 RUN set -ex; \ fetchDeps=" \ @@ -148,8 +148,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-26.0.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.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/26/fpm-alpine/Dockerfile b/26/fpm-alpine/Dockerfile index fee452d8..93624c90 100644 --- a/26/fpm-alpine/Dockerfile +++ b/26/fpm-alpine/Dockerfile @@ -111,7 +111,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 26.0.8 +ENV NEXTCLOUD_VERSION 26.0.9 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -119,8 +119,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.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/26/fpm/Dockerfile b/26/fpm/Dockerfile index 1b4ce5ef..bcc80445 100644 --- a/26/fpm/Dockerfile +++ b/26/fpm/Dockerfile @@ -123,7 +123,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 26.0.8 +ENV NEXTCLOUD_VERSION 26.0.9 RUN set -ex; \ fetchDeps=" \ @@ -133,8 +133,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-26.0.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.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/27/apache/Dockerfile b/27/apache/Dockerfile index 36576329..192e8633 100644 --- a/27/apache/Dockerfile +++ b/27/apache/Dockerfile @@ -138,7 +138,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 27.1.3 +ENV NEXTCLOUD_VERSION 27.1.4 RUN set -ex; \ fetchDeps=" \ @@ -148,8 +148,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-27.1.3.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.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/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index 66e5df1d..e3f27315 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -111,7 +111,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.3 +ENV NEXTCLOUD_VERSION 27.1.4 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -119,8 +119,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.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/27/fpm/Dockerfile b/27/fpm/Dockerfile index 34ab45c5..4f31a70c 100644 --- a/27/fpm/Dockerfile +++ b/27/fpm/Dockerfile @@ -123,7 +123,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.3 +ENV NEXTCLOUD_VERSION 27.1.4 RUN set -ex; \ fetchDeps=" \ @@ -133,8 +133,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-27.1.3.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.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 3512630d..587d8c30 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -27.1.3 +27.1.4 diff --git a/versions.json b/versions.json index 1984f0ef..8f640d43 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "27": { "branch": "27", - "version": "27.1.3", - "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.3.tar.bz2.asc", + "version": "27.1.4", + "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -27,9 +27,9 @@ }, "26": { "branch": "26", - "version": "26.0.8", - "url": "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-26.0.8.tar.bz2.asc", + "version": "26.0.9", + "url": "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From d1dbc77e0b5e851105cf8606942e74b7d21fe682 Mon Sep 17 00:00:00 2001 From: Jesper Noordsij <45041769+jnoordsij@users.noreply.github.com> Date: Fri, 24 Nov 2023 11:42:06 +0100 Subject: [PATCH 010/123] EOL 25 (#2102) Signed-off-by: Jesper Noordsij --- 25/apache/Dockerfile | 171 ----------- .../config/apache-pretty-urls.config.php | 4 - 25/apache/config/apcu.config.php | 4 - 25/apache/config/apps.config.php | 15 - 25/apache/config/autoconfig.php | 41 --- 25/apache/config/redis.config.php | 17 -- 25/apache/config/reverse-proxy.config.php | 30 -- 25/apache/config/s3.config.php | 41 --- 25/apache/config/smtp.config.php | 22 -- 25/apache/config/swift.config.php | 31 -- 25/apache/cron.sh | 4 - 25/apache/entrypoint.sh | 279 ------------------ 25/apache/upgrade.exclude | 6 - 25/fpm-alpine/Dockerfile | 140 --------- 25/fpm-alpine/config/apcu.config.php | 4 - 25/fpm-alpine/config/apps.config.php | 15 - 25/fpm-alpine/config/autoconfig.php | 41 --- 25/fpm-alpine/config/redis.config.php | 17 -- 25/fpm-alpine/config/reverse-proxy.config.php | 30 -- 25/fpm-alpine/config/s3.config.php | 41 --- 25/fpm-alpine/config/smtp.config.php | 22 -- 25/fpm-alpine/config/swift.config.php | 31 -- 25/fpm-alpine/cron.sh | 4 - 25/fpm-alpine/entrypoint.sh | 279 ------------------ 25/fpm-alpine/upgrade.exclude | 6 - 25/fpm/Dockerfile | 156 ---------- 25/fpm/config/apcu.config.php | 4 - 25/fpm/config/apps.config.php | 15 - 25/fpm/config/autoconfig.php | 41 --- 25/fpm/config/redis.config.php | 17 -- 25/fpm/config/reverse-proxy.config.php | 30 -- 25/fpm/config/s3.config.php | 41 --- 25/fpm/config/smtp.config.php | 22 -- 25/fpm/config/swift.config.php | 31 -- 25/fpm/cron.sh | 4 - 25/fpm/entrypoint.sh | 279 ------------------ 25/fpm/upgrade.exclude | 6 - update.sh | 13 +- versions.json | 26 -- 39 files changed, 1 insertion(+), 1979 deletions(-) delete mode 100644 25/apache/Dockerfile delete mode 100644 25/apache/config/apache-pretty-urls.config.php delete mode 100644 25/apache/config/apcu.config.php delete mode 100644 25/apache/config/apps.config.php delete mode 100644 25/apache/config/autoconfig.php delete mode 100644 25/apache/config/redis.config.php delete mode 100644 25/apache/config/reverse-proxy.config.php delete mode 100644 25/apache/config/s3.config.php delete mode 100644 25/apache/config/smtp.config.php delete mode 100644 25/apache/config/swift.config.php delete mode 100755 25/apache/cron.sh delete mode 100755 25/apache/entrypoint.sh delete mode 100644 25/apache/upgrade.exclude delete mode 100644 25/fpm-alpine/Dockerfile delete mode 100644 25/fpm-alpine/config/apcu.config.php delete mode 100644 25/fpm-alpine/config/apps.config.php delete mode 100644 25/fpm-alpine/config/autoconfig.php delete mode 100644 25/fpm-alpine/config/redis.config.php delete mode 100644 25/fpm-alpine/config/reverse-proxy.config.php delete mode 100644 25/fpm-alpine/config/s3.config.php delete mode 100644 25/fpm-alpine/config/smtp.config.php delete mode 100644 25/fpm-alpine/config/swift.config.php delete mode 100755 25/fpm-alpine/cron.sh delete mode 100755 25/fpm-alpine/entrypoint.sh delete mode 100644 25/fpm-alpine/upgrade.exclude delete mode 100644 25/fpm/Dockerfile delete mode 100644 25/fpm/config/apcu.config.php delete mode 100644 25/fpm/config/apps.config.php delete mode 100644 25/fpm/config/autoconfig.php delete mode 100644 25/fpm/config/redis.config.php delete mode 100644 25/fpm/config/reverse-proxy.config.php delete mode 100644 25/fpm/config/s3.config.php delete mode 100644 25/fpm/config/smtp.config.php delete mode 100644 25/fpm/config/swift.config.php delete mode 100755 25/fpm/cron.sh delete mode 100755 25/fpm/entrypoint.sh delete mode 100644 25/fpm/upgrade.exclude diff --git a/25/apache/Dockerfile b/25/apache/Dockerfile deleted file mode 100644 index 9e9d448f..00000000 --- a/25/apache/Dockerfile +++ /dev/null @@ -1,171 +0,0 @@ -# DO NOT EDIT: created by update.sh from Dockerfile-debian.template -FROM php:8.1-apache-bullseye - -# entrypoint.sh and cron.sh dependencies -RUN set -ex; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - busybox-static \ - bzip2 \ - libldap-common \ - libmagickcore-6.q16-6-extra \ - rsync \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - mkdir -p /var/spool/cron/crontabs; \ - echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data - -# install the PHP extensions we need -# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html -ENV PHP_MEMORY_LIMIT 512M -ENV PHP_UPLOAD_LIMIT 512M -RUN set -ex; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - libcurl4-openssl-dev \ - libevent-dev \ - libfreetype6-dev \ - libgmp-dev \ - libicu-dev \ - libjpeg-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libpq-dev \ - libwebp-dev \ - libxml2-dev \ - libzip-dev \ - ; \ - \ - debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ - docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ - docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ - docker-php-ext-install -j "$(nproc)" \ - bcmath \ - exif \ - gd \ - gmp \ - intl \ - ldap \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - zip \ - ; \ - \ -# pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ - pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ - \ - docker-php-ext-enable \ - apcu \ - imagick \ - memcached \ - redis \ - ; \ - rm -r /tmp/pear; \ - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark; \ - ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -rt apt-mark manual; \ - \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/* - -# set recommended PHP.ini settings -# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache -RUN { \ - echo 'opcache.enable=1'; \ - echo 'opcache.interned_strings_buffer=32'; \ - echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.save_comments=1'; \ - echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.jit=1255'; \ - echo 'opcache.jit_buffer_size=128M'; \ - } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ - \ - echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ - \ - { \ - echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ - echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ - echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ - \ - mkdir /var/www/data; \ - mkdir -p /docker-entrypoint-hooks.d/pre-installation \ - /docker-entrypoint-hooks.d/post-installation \ - /docker-entrypoint-hooks.d/pre-upgrade \ - /docker-entrypoint-hooks.d/post-upgrade \ - /docker-entrypoint-hooks.d/before-starting; \ - chown -R www-data:root /var/www; \ - chmod -R g=u /var/www - -VOLUME /var/www/html - -RUN a2enmod headers rewrite remoteip ; \ - { \ - echo 'RemoteIPHeader X-Real-IP'; \ - echo 'RemoteIPInternalProxy 10.0.0.0/8'; \ - echo 'RemoteIPInternalProxy 172.16.0.0/12'; \ - echo 'RemoteIPInternalProxy 192.168.0.0/16'; \ - } > /etc/apache2/conf-available/remoteip.conf; \ - a2enconf remoteip - -# set apache config LimitRequestBody -ENV APACHE_BODY_LIMIT 1073741824 -RUN { \ - echo 'LimitRequestBody ${APACHE_BODY_LIMIT}'; \ - } > /etc/apache2/conf-available/apache-limits.conf; \ - a2enconf apache-limits - -ENV NEXTCLOUD_VERSION 25.0.13 - -RUN set -ex; \ - fetchDeps=" \ - gnupg \ - dirmngr \ - "; \ - apt-get update; \ - apt-get install -y --no-install-recommends $fetchDeps; \ - \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.tar.bz2.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ -# gpg key from https://nextcloud.com/nextcloud.asc - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ - gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ - gpgconf --kill all; \ - rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ - mkdir -p /usr/src/nextcloud/data; \ - 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; \ - rm -rf /var/lib/apt/lists/* - -COPY *.sh upgrade.exclude / -COPY config/* /usr/src/nextcloud/config/ - -ENTRYPOINT ["/entrypoint.sh"] -CMD ["apache2-foreground"] diff --git a/25/apache/config/apache-pretty-urls.config.php b/25/apache/config/apache-pretty-urls.config.php deleted file mode 100644 index 72da1d8c..00000000 --- a/25/apache/config/apache-pretty-urls.config.php +++ /dev/null @@ -1,4 +0,0 @@ - '/', -); diff --git a/25/apache/config/apcu.config.php b/25/apache/config/apcu.config.php deleted file mode 100644 index 69fed876..00000000 --- a/25/apache/config/apcu.config.php +++ /dev/null @@ -1,4 +0,0 @@ - '\OC\Memcache\APCu', -); diff --git a/25/apache/config/apps.config.php b/25/apache/config/apps.config.php deleted file mode 100644 index 4c37f72a..00000000 --- a/25/apache/config/apps.config.php +++ /dev/null @@ -1,15 +0,0 @@ - array ( - 0 => array ( - 'path' => OC::$SERVERROOT.'/apps', - 'url' => '/apps', - 'writable' => false, - ), - 1 => array ( - 'path' => OC::$SERVERROOT.'/custom_apps', - 'url' => '/custom_apps', - 'writable' => true, - ), - ), -); diff --git a/25/apache/config/autoconfig.php b/25/apache/config/autoconfig.php deleted file mode 100644 index 92ad2a1c..00000000 --- a/25/apache/config/autoconfig.php +++ /dev/null @@ -1,41 +0,0 @@ - '\OC\Memcache\Redis', - 'memcache.locking' => '\OC\Memcache\Redis', - 'redis' => array( - 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), - ), - ); - - if (getenv('REDIS_HOST_PORT') !== false) { - $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); - } elseif (getenv('REDIS_HOST')[0] != '/') { - $CONFIG['redis']['port'] = 6379; - } -} diff --git a/25/apache/config/reverse-proxy.config.php b/25/apache/config/reverse-proxy.config.php deleted file mode 100644 index 7df0415e..00000000 --- a/25/apache/config/reverse-proxy.config.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'class' => '\OC\Files\ObjectStore\S3', - 'arguments' => array( - 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), - 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', - 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', - 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', - 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, - // required for some non Amazon S3 implementations - 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', - // required for older protocol versions - 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' - ) - ) - ); - - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { - $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_KEY')) { - $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); - } else { - $CONFIG['objectstore']['arguments']['key'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { - $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SECRET')) { - $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); - } else { - $CONFIG['objectstore']['arguments']['secret'] = ''; - } -} diff --git a/25/apache/config/smtp.config.php b/25/apache/config/smtp.config.php deleted file mode 100644 index 5006fe47..00000000 --- a/25/apache/config/smtp.config.php +++ /dev/null @@ -1,22 +0,0 @@ - 'smtp', - 'mail_smtphost' => getenv('SMTP_HOST'), - 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), - 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), - 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', - 'mail_smtpname' => getenv('SMTP_NAME') ?: '', - 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), - 'mail_domain' => getenv('MAIL_DOMAIN'), - ); - - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { - $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); - } elseif (getenv('SMTP_PASSWORD')) { - $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); - } else { - $CONFIG['mail_smtppassword'] = ''; - } -} diff --git a/25/apache/config/swift.config.php b/25/apache/config/swift.config.php deleted file mode 100644 index 47ada566..00000000 --- a/25/apache/config/swift.config.php +++ /dev/null @@ -1,31 +0,0 @@ - [ - 'class' => 'OC\\Files\\ObjectStore\\Swift', - 'arguments' => [ - 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', - 'user' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), - 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', - ], - ], - 'scope' => [ - 'project' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', - ], - ], - ], - 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', - 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), - 'url' => getenv('OBJECTSTORE_SWIFT_URL'), - 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), - ] - ] - ); -} diff --git a/25/apache/cron.sh b/25/apache/cron.sh deleted file mode 100755 index b4cd9af6..00000000 --- a/25/apache/cron.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -exec busybox crond -f -L /dev/stdout diff --git a/25/apache/entrypoint.sh b/25/apache/entrypoint.sh deleted file mode 100755 index edb539a0..00000000 --- a/25/apache/entrypoint.sh +++ /dev/null @@ -1,279 +0,0 @@ -#!/bin/sh -set -eu - -# version_greater A B returns whether A > B -version_greater() { - [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] -} - -# return true if specified directory is empty -directory_empty() { - [ -z "$(ls -A "$1/")" ] -} - -run_as() { - if [ "$(id -u)" = 0 ]; then - su -p "$user" -s /bin/sh -c "$1" - else - sh -c "$1" - fi -} - -# Execute all executable files in a given directory in alphanumeric order -run_path() { - local hook_folder_path="/docker-entrypoint-hooks.d/$1" - local return_code=0 - - if ! [ -d "${hook_folder_path}" ]; then - echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" - return 0 - fi - - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do - if ! [ -x "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" - continue - fi - - echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" - - run_as "${script_file_path}" || return_code="$?" - - if [ "${return_code}" -ne "0" ]; then - echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" - exit 1 - fi - - echo "==> Finished the script: \"${script_file_path}\"" - done - ) -} - -# usage: file_env VAR [DEFAULT] -# ie: file_env 'XYZ_DB_PASSWORD' 'example' -# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of -# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) -file_env() { - local var="$1" - local fileVar="${var}_FILE" - local def="${2:-}" - local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") - local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") - if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then - echo >&2 "error: both $var and $fileVar are set (but are exclusive)" - exit 1 - fi - if [ -n "${varValue}" ]; then - export "$var"="${varValue}" - elif [ -n "${fileVarValue}" ]; then - export "$var"="$(cat "${fileVarValue}")" - elif [ -n "${def}" ]; then - export "$var"="$def" - fi - unset "$fileVar" -} - -if expr "$1" : "apache" 1>/dev/null; then - if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then - a2disconf remoteip - fi -fi - -if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then - uid="$(id -u)" - gid="$(id -g)" - if [ "$uid" = '0' ]; then - case "$1" in - apache2*) - user="${APACHE_RUN_USER:-www-data}" - group="${APACHE_RUN_GROUP:-www-data}" - - # strip off any '#' symbol ('#1000' is valid syntax for Apache) - user="${user#'#'}" - group="${group#'#'}" - ;; - *) # php-fpm - user='www-data' - group='www-data' - ;; - esac - else - user="$uid" - group="$gid" - fi - - if [ -n "${REDIS_HOST+x}" ]; then - - echo "Configuring Redis as session handler" - { - file_env REDIS_HOST_PASSWORD - echo 'session.save_handler = redis' - # check if redis host is an unix socket path - if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then - if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" - else - echo "session.save_path = \"unix://${REDIS_HOST}\"" - 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}\"" - else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" - 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. - ( - if ! flock -n 9; then - # If we couldn't get it immediately, show a message, then wait for real - echo "Another process is initializing Nextcloud. Waiting..." - flock 9 - fi - - installed_version="0.0.0.0" - if [ -f /var/www/html/version.php ]; then - # shellcheck disable=SC2016 - installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" - fi - # shellcheck disable=SC2016 - image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" - - if version_greater "$installed_version" "$image_version"; then - echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" - exit 1 - fi - - if version_greater "$image_version" "$installed_version"; then - echo "Initializing nextcloud $image_version ..." - if [ "$installed_version" != "0.0.0.0" ]; then - if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then - echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." - echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." - exit 1 - fi - echo "Upgrading nextcloud from $installed_version ..." - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before - fi - if [ "$(id -u)" = 0 ]; then - rsync_options="-rlDog --chown $user:$group" - else - rsync_options="-rlD" - fi - - rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ - for dir in config data custom_apps themes; do - if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then - rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - fi - done - rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - - # Install - if [ "$installed_version" = "0.0.0.0" ]; then - echo "New nextcloud instance" - - file_env NEXTCLOUD_ADMIN_PASSWORD - file_env NEXTCLOUD_ADMIN_USER - - if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then - # shellcheck disable=SC2016 - install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' - if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then - # shellcheck disable=SC2016 - install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' - fi - - file_env MYSQL_DATABASE - file_env MYSQL_PASSWORD - file_env MYSQL_USER - file_env POSTGRES_DB - file_env POSTGRES_PASSWORD - file_env POSTGRES_USER - - install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then - echo "Installing with SQLite database" - # shellcheck disable=SC2016 - install_options=$install_options' --database-name "$SQLITE_DATABASE"' - install=true - elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then - echo "Installing with MySQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' - install=true - elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then - echo "Installing with PostgreSQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' - install=true - fi - - if [ "$install" = true ]; then - run_path pre-installation - - echo "Starting nextcloud installation" - max_retries=10 - try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] - do - echo "Retrying install..." - try=$((try+1)) - sleep 10s - done - if [ "$try" -gt "$max_retries" ]; then - echo "Installing of nextcloud failed!" - exit 1 - fi - if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then - echo "Setting trusted domains…" - NC_TRUSTED_DOMAIN_IDX=1 - for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do - DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') - run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" - NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) - done - fi - - run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi - fi - # Upgrade - else - run_path pre-upgrade - - run_as 'php /var/www/html/occ upgrade' - - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after - echo "The following apps have been disabled:" - diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 - rm -f /tmp/list_before /tmp/list_after - - run_path post-upgrade - fi - - echo "Initializing finished" - fi - - # Update htaccess after init if requested - if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then - run_as 'php /var/www/html/occ maintenance:update:htaccess' - fi - ) 9> /var/www/html/nextcloud-init-sync.lock - - run_path before-starting -fi - -exec "$@" diff --git a/25/apache/upgrade.exclude b/25/apache/upgrade.exclude deleted file mode 100644 index 31ce39a8..00000000 --- a/25/apache/upgrade.exclude +++ /dev/null @@ -1,6 +0,0 @@ -/config/ -/data/ -/custom_apps/ -/themes/ -/version.php -/nextcloud-init-sync.lock diff --git a/25/fpm-alpine/Dockerfile b/25/fpm-alpine/Dockerfile deleted file mode 100644 index a9d019c6..00000000 --- a/25/fpm-alpine/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template -FROM php:8.1-fpm-alpine3.16 - -# entrypoint.sh and cron.sh dependencies -RUN set -ex; \ - \ - apk add --no-cache \ - imagemagick \ - rsync \ - ; \ - \ - rm /var/spool/cron/crontabs/root; \ - echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data - -# install the PHP extensions we need -# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html -RUN set -ex; \ - \ - apk add --no-cache --virtual .build-deps \ - $PHPIZE_DEPS \ - autoconf \ - freetype-dev \ - gmp-dev \ - icu-dev \ - imagemagick-dev \ - libevent-dev \ - libjpeg-turbo-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libwebp-dev \ - libxml2-dev \ - libzip-dev \ - openldap-dev \ - pcre-dev \ - postgresql-dev \ - ; \ - \ - docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ - docker-php-ext-configure ldap; \ - docker-php-ext-install -j "$(nproc)" \ - bcmath \ - exif \ - gd \ - gmp \ - intl \ - ldap \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - zip \ - ; \ - \ -# pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ - pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ - \ - docker-php-ext-enable \ - apcu \ - imagick \ - memcached \ - redis \ - ; \ - rm -r /tmp/pear; \ - \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .nextcloud-phpext-rundeps $runDeps; \ - apk del --no-network .build-deps - -# set recommended PHP.ini settings -# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache -ENV PHP_MEMORY_LIMIT 512M -ENV PHP_UPLOAD_LIMIT 512M -RUN { \ - echo 'opcache.enable=1'; \ - echo 'opcache.interned_strings_buffer=32'; \ - echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.save_comments=1'; \ - echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.jit=1255'; \ - echo 'opcache.jit_buffer_size=128M'; \ - } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ - \ - echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ - \ - { \ - echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ - echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ - echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ - \ - mkdir /var/www/data; \ - mkdir -p /docker-entrypoint-hooks.d/pre-installation \ - /docker-entrypoint-hooks.d/post-installation \ - /docker-entrypoint-hooks.d/pre-upgrade \ - /docker-entrypoint-hooks.d/post-upgrade \ - /docker-entrypoint-hooks.d/before-starting; \ - chown -R www-data:root /var/www; \ - chmod -R g=u /var/www - -VOLUME /var/www/html - - -ENV NEXTCLOUD_VERSION 25.0.13 - -RUN set -ex; \ - apk add --no-cache --virtual .fetch-deps \ - bzip2 \ - gnupg \ - ; \ - \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.tar.bz2.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ -# gpg key from https://nextcloud.com/nextcloud.asc - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ - gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ - gpgconf --kill all; \ - rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ - mkdir -p /usr/src/nextcloud/data; \ - mkdir -p /usr/src/nextcloud/custom_apps; \ - chmod +x /usr/src/nextcloud/occ; \ - apk del --no-network .fetch-deps - -COPY *.sh upgrade.exclude / -COPY config/* /usr/src/nextcloud/config/ - -ENTRYPOINT ["/entrypoint.sh"] -CMD ["php-fpm"] diff --git a/25/fpm-alpine/config/apcu.config.php b/25/fpm-alpine/config/apcu.config.php deleted file mode 100644 index 69fed876..00000000 --- a/25/fpm-alpine/config/apcu.config.php +++ /dev/null @@ -1,4 +0,0 @@ - '\OC\Memcache\APCu', -); diff --git a/25/fpm-alpine/config/apps.config.php b/25/fpm-alpine/config/apps.config.php deleted file mode 100644 index 4c37f72a..00000000 --- a/25/fpm-alpine/config/apps.config.php +++ /dev/null @@ -1,15 +0,0 @@ - array ( - 0 => array ( - 'path' => OC::$SERVERROOT.'/apps', - 'url' => '/apps', - 'writable' => false, - ), - 1 => array ( - 'path' => OC::$SERVERROOT.'/custom_apps', - 'url' => '/custom_apps', - 'writable' => true, - ), - ), -); diff --git a/25/fpm-alpine/config/autoconfig.php b/25/fpm-alpine/config/autoconfig.php deleted file mode 100644 index 92ad2a1c..00000000 --- a/25/fpm-alpine/config/autoconfig.php +++ /dev/null @@ -1,41 +0,0 @@ - '\OC\Memcache\Redis', - 'memcache.locking' => '\OC\Memcache\Redis', - 'redis' => array( - 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), - ), - ); - - if (getenv('REDIS_HOST_PORT') !== false) { - $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); - } elseif (getenv('REDIS_HOST')[0] != '/') { - $CONFIG['redis']['port'] = 6379; - } -} diff --git a/25/fpm-alpine/config/reverse-proxy.config.php b/25/fpm-alpine/config/reverse-proxy.config.php deleted file mode 100644 index 7df0415e..00000000 --- a/25/fpm-alpine/config/reverse-proxy.config.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'class' => '\OC\Files\ObjectStore\S3', - 'arguments' => array( - 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), - 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', - 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', - 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', - 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, - // required for some non Amazon S3 implementations - 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', - // required for older protocol versions - 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' - ) - ) - ); - - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { - $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_KEY')) { - $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); - } else { - $CONFIG['objectstore']['arguments']['key'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { - $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SECRET')) { - $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); - } else { - $CONFIG['objectstore']['arguments']['secret'] = ''; - } -} diff --git a/25/fpm-alpine/config/smtp.config.php b/25/fpm-alpine/config/smtp.config.php deleted file mode 100644 index 5006fe47..00000000 --- a/25/fpm-alpine/config/smtp.config.php +++ /dev/null @@ -1,22 +0,0 @@ - 'smtp', - 'mail_smtphost' => getenv('SMTP_HOST'), - 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), - 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), - 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', - 'mail_smtpname' => getenv('SMTP_NAME') ?: '', - 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), - 'mail_domain' => getenv('MAIL_DOMAIN'), - ); - - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { - $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); - } elseif (getenv('SMTP_PASSWORD')) { - $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); - } else { - $CONFIG['mail_smtppassword'] = ''; - } -} diff --git a/25/fpm-alpine/config/swift.config.php b/25/fpm-alpine/config/swift.config.php deleted file mode 100644 index 47ada566..00000000 --- a/25/fpm-alpine/config/swift.config.php +++ /dev/null @@ -1,31 +0,0 @@ - [ - 'class' => 'OC\\Files\\ObjectStore\\Swift', - 'arguments' => [ - 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', - 'user' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), - 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', - ], - ], - 'scope' => [ - 'project' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', - ], - ], - ], - 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', - 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), - 'url' => getenv('OBJECTSTORE_SWIFT_URL'), - 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), - ] - ] - ); -} diff --git a/25/fpm-alpine/cron.sh b/25/fpm-alpine/cron.sh deleted file mode 100755 index b4cd9af6..00000000 --- a/25/fpm-alpine/cron.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -exec busybox crond -f -L /dev/stdout diff --git a/25/fpm-alpine/entrypoint.sh b/25/fpm-alpine/entrypoint.sh deleted file mode 100755 index edb539a0..00000000 --- a/25/fpm-alpine/entrypoint.sh +++ /dev/null @@ -1,279 +0,0 @@ -#!/bin/sh -set -eu - -# version_greater A B returns whether A > B -version_greater() { - [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] -} - -# return true if specified directory is empty -directory_empty() { - [ -z "$(ls -A "$1/")" ] -} - -run_as() { - if [ "$(id -u)" = 0 ]; then - su -p "$user" -s /bin/sh -c "$1" - else - sh -c "$1" - fi -} - -# Execute all executable files in a given directory in alphanumeric order -run_path() { - local hook_folder_path="/docker-entrypoint-hooks.d/$1" - local return_code=0 - - if ! [ -d "${hook_folder_path}" ]; then - echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" - return 0 - fi - - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do - if ! [ -x "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" - continue - fi - - echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" - - run_as "${script_file_path}" || return_code="$?" - - if [ "${return_code}" -ne "0" ]; then - echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" - exit 1 - fi - - echo "==> Finished the script: \"${script_file_path}\"" - done - ) -} - -# usage: file_env VAR [DEFAULT] -# ie: file_env 'XYZ_DB_PASSWORD' 'example' -# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of -# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) -file_env() { - local var="$1" - local fileVar="${var}_FILE" - local def="${2:-}" - local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") - local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") - if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then - echo >&2 "error: both $var and $fileVar are set (but are exclusive)" - exit 1 - fi - if [ -n "${varValue}" ]; then - export "$var"="${varValue}" - elif [ -n "${fileVarValue}" ]; then - export "$var"="$(cat "${fileVarValue}")" - elif [ -n "${def}" ]; then - export "$var"="$def" - fi - unset "$fileVar" -} - -if expr "$1" : "apache" 1>/dev/null; then - if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then - a2disconf remoteip - fi -fi - -if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then - uid="$(id -u)" - gid="$(id -g)" - if [ "$uid" = '0' ]; then - case "$1" in - apache2*) - user="${APACHE_RUN_USER:-www-data}" - group="${APACHE_RUN_GROUP:-www-data}" - - # strip off any '#' symbol ('#1000' is valid syntax for Apache) - user="${user#'#'}" - group="${group#'#'}" - ;; - *) # php-fpm - user='www-data' - group='www-data' - ;; - esac - else - user="$uid" - group="$gid" - fi - - if [ -n "${REDIS_HOST+x}" ]; then - - echo "Configuring Redis as session handler" - { - file_env REDIS_HOST_PASSWORD - echo 'session.save_handler = redis' - # check if redis host is an unix socket path - if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then - if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" - else - echo "session.save_path = \"unix://${REDIS_HOST}\"" - 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}\"" - else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" - 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. - ( - if ! flock -n 9; then - # If we couldn't get it immediately, show a message, then wait for real - echo "Another process is initializing Nextcloud. Waiting..." - flock 9 - fi - - installed_version="0.0.0.0" - if [ -f /var/www/html/version.php ]; then - # shellcheck disable=SC2016 - installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" - fi - # shellcheck disable=SC2016 - image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" - - if version_greater "$installed_version" "$image_version"; then - echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" - exit 1 - fi - - if version_greater "$image_version" "$installed_version"; then - echo "Initializing nextcloud $image_version ..." - if [ "$installed_version" != "0.0.0.0" ]; then - if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then - echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." - echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." - exit 1 - fi - echo "Upgrading nextcloud from $installed_version ..." - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before - fi - if [ "$(id -u)" = 0 ]; then - rsync_options="-rlDog --chown $user:$group" - else - rsync_options="-rlD" - fi - - rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ - for dir in config data custom_apps themes; do - if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then - rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - fi - done - rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - - # Install - if [ "$installed_version" = "0.0.0.0" ]; then - echo "New nextcloud instance" - - file_env NEXTCLOUD_ADMIN_PASSWORD - file_env NEXTCLOUD_ADMIN_USER - - if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then - # shellcheck disable=SC2016 - install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' - if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then - # shellcheck disable=SC2016 - install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' - fi - - file_env MYSQL_DATABASE - file_env MYSQL_PASSWORD - file_env MYSQL_USER - file_env POSTGRES_DB - file_env POSTGRES_PASSWORD - file_env POSTGRES_USER - - install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then - echo "Installing with SQLite database" - # shellcheck disable=SC2016 - install_options=$install_options' --database-name "$SQLITE_DATABASE"' - install=true - elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then - echo "Installing with MySQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' - install=true - elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then - echo "Installing with PostgreSQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' - install=true - fi - - if [ "$install" = true ]; then - run_path pre-installation - - echo "Starting nextcloud installation" - max_retries=10 - try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] - do - echo "Retrying install..." - try=$((try+1)) - sleep 10s - done - if [ "$try" -gt "$max_retries" ]; then - echo "Installing of nextcloud failed!" - exit 1 - fi - if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then - echo "Setting trusted domains…" - NC_TRUSTED_DOMAIN_IDX=1 - for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do - DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') - run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" - NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) - done - fi - - run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi - fi - # Upgrade - else - run_path pre-upgrade - - run_as 'php /var/www/html/occ upgrade' - - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after - echo "The following apps have been disabled:" - diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 - rm -f /tmp/list_before /tmp/list_after - - run_path post-upgrade - fi - - echo "Initializing finished" - fi - - # Update htaccess after init if requested - if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then - run_as 'php /var/www/html/occ maintenance:update:htaccess' - fi - ) 9> /var/www/html/nextcloud-init-sync.lock - - run_path before-starting -fi - -exec "$@" diff --git a/25/fpm-alpine/upgrade.exclude b/25/fpm-alpine/upgrade.exclude deleted file mode 100644 index 31ce39a8..00000000 --- a/25/fpm-alpine/upgrade.exclude +++ /dev/null @@ -1,6 +0,0 @@ -/config/ -/data/ -/custom_apps/ -/themes/ -/version.php -/nextcloud-init-sync.lock diff --git a/25/fpm/Dockerfile b/25/fpm/Dockerfile deleted file mode 100644 index b9794e93..00000000 --- a/25/fpm/Dockerfile +++ /dev/null @@ -1,156 +0,0 @@ -# DO NOT EDIT: created by update.sh from Dockerfile-debian.template -FROM php:8.1-fpm-bullseye - -# entrypoint.sh and cron.sh dependencies -RUN set -ex; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - busybox-static \ - bzip2 \ - libldap-common \ - libmagickcore-6.q16-6-extra \ - rsync \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - mkdir -p /var/spool/cron/crontabs; \ - echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data - -# install the PHP extensions we need -# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html -ENV PHP_MEMORY_LIMIT 512M -ENV PHP_UPLOAD_LIMIT 512M -RUN set -ex; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - libcurl4-openssl-dev \ - libevent-dev \ - libfreetype6-dev \ - libgmp-dev \ - libicu-dev \ - libjpeg-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libpq-dev \ - libwebp-dev \ - libxml2-dev \ - libzip-dev \ - ; \ - \ - debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ - docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ - docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ - docker-php-ext-install -j "$(nproc)" \ - bcmath \ - exif \ - gd \ - gmp \ - intl \ - ldap \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - zip \ - ; \ - \ -# pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ - pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ - \ - docker-php-ext-enable \ - apcu \ - imagick \ - memcached \ - redis \ - ; \ - rm -r /tmp/pear; \ - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark; \ - ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -rt apt-mark manual; \ - \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/* - -# set recommended PHP.ini settings -# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache -RUN { \ - echo 'opcache.enable=1'; \ - echo 'opcache.interned_strings_buffer=32'; \ - echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.save_comments=1'; \ - echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.jit=1255'; \ - echo 'opcache.jit_buffer_size=128M'; \ - } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ - \ - echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ - \ - { \ - echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ - echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ - echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ - \ - mkdir /var/www/data; \ - mkdir -p /docker-entrypoint-hooks.d/pre-installation \ - /docker-entrypoint-hooks.d/post-installation \ - /docker-entrypoint-hooks.d/pre-upgrade \ - /docker-entrypoint-hooks.d/post-upgrade \ - /docker-entrypoint-hooks.d/before-starting; \ - chown -R www-data:root /var/www; \ - chmod -R g=u /var/www - -VOLUME /var/www/html - - -ENV NEXTCLOUD_VERSION 25.0.13 - -RUN set -ex; \ - fetchDeps=" \ - gnupg \ - dirmngr \ - "; \ - apt-get update; \ - apt-get install -y --no-install-recommends $fetchDeps; \ - \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.tar.bz2.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ -# gpg key from https://nextcloud.com/nextcloud.asc - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ - gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ - gpgconf --kill all; \ - rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ - mkdir -p /usr/src/nextcloud/data; \ - 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; \ - rm -rf /var/lib/apt/lists/* - -COPY *.sh upgrade.exclude / -COPY config/* /usr/src/nextcloud/config/ - -ENTRYPOINT ["/entrypoint.sh"] -CMD ["php-fpm"] diff --git a/25/fpm/config/apcu.config.php b/25/fpm/config/apcu.config.php deleted file mode 100644 index 69fed876..00000000 --- a/25/fpm/config/apcu.config.php +++ /dev/null @@ -1,4 +0,0 @@ - '\OC\Memcache\APCu', -); diff --git a/25/fpm/config/apps.config.php b/25/fpm/config/apps.config.php deleted file mode 100644 index 4c37f72a..00000000 --- a/25/fpm/config/apps.config.php +++ /dev/null @@ -1,15 +0,0 @@ - array ( - 0 => array ( - 'path' => OC::$SERVERROOT.'/apps', - 'url' => '/apps', - 'writable' => false, - ), - 1 => array ( - 'path' => OC::$SERVERROOT.'/custom_apps', - 'url' => '/custom_apps', - 'writable' => true, - ), - ), -); diff --git a/25/fpm/config/autoconfig.php b/25/fpm/config/autoconfig.php deleted file mode 100644 index 92ad2a1c..00000000 --- a/25/fpm/config/autoconfig.php +++ /dev/null @@ -1,41 +0,0 @@ - '\OC\Memcache\Redis', - 'memcache.locking' => '\OC\Memcache\Redis', - 'redis' => array( - 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), - ), - ); - - if (getenv('REDIS_HOST_PORT') !== false) { - $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); - } elseif (getenv('REDIS_HOST')[0] != '/') { - $CONFIG['redis']['port'] = 6379; - } -} diff --git a/25/fpm/config/reverse-proxy.config.php b/25/fpm/config/reverse-proxy.config.php deleted file mode 100644 index 7df0415e..00000000 --- a/25/fpm/config/reverse-proxy.config.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'class' => '\OC\Files\ObjectStore\S3', - 'arguments' => array( - 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), - 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', - 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', - 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', - 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, - // required for some non Amazon S3 implementations - 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', - // required for older protocol versions - 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' - ) - ) - ); - - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { - $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_KEY')) { - $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); - } else { - $CONFIG['objectstore']['arguments']['key'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { - $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SECRET')) { - $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); - } else { - $CONFIG['objectstore']['arguments']['secret'] = ''; - } -} diff --git a/25/fpm/config/smtp.config.php b/25/fpm/config/smtp.config.php deleted file mode 100644 index 5006fe47..00000000 --- a/25/fpm/config/smtp.config.php +++ /dev/null @@ -1,22 +0,0 @@ - 'smtp', - 'mail_smtphost' => getenv('SMTP_HOST'), - 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), - 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), - 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', - 'mail_smtpname' => getenv('SMTP_NAME') ?: '', - 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), - 'mail_domain' => getenv('MAIL_DOMAIN'), - ); - - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { - $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); - } elseif (getenv('SMTP_PASSWORD')) { - $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); - } else { - $CONFIG['mail_smtppassword'] = ''; - } -} diff --git a/25/fpm/config/swift.config.php b/25/fpm/config/swift.config.php deleted file mode 100644 index 47ada566..00000000 --- a/25/fpm/config/swift.config.php +++ /dev/null @@ -1,31 +0,0 @@ - [ - 'class' => 'OC\\Files\\ObjectStore\\Swift', - 'arguments' => [ - 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', - 'user' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), - 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', - ], - ], - 'scope' => [ - 'project' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', - ], - ], - ], - 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', - 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), - 'url' => getenv('OBJECTSTORE_SWIFT_URL'), - 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), - ] - ] - ); -} diff --git a/25/fpm/cron.sh b/25/fpm/cron.sh deleted file mode 100755 index b4cd9af6..00000000 --- a/25/fpm/cron.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -exec busybox crond -f -L /dev/stdout diff --git a/25/fpm/entrypoint.sh b/25/fpm/entrypoint.sh deleted file mode 100755 index edb539a0..00000000 --- a/25/fpm/entrypoint.sh +++ /dev/null @@ -1,279 +0,0 @@ -#!/bin/sh -set -eu - -# version_greater A B returns whether A > B -version_greater() { - [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] -} - -# return true if specified directory is empty -directory_empty() { - [ -z "$(ls -A "$1/")" ] -} - -run_as() { - if [ "$(id -u)" = 0 ]; then - su -p "$user" -s /bin/sh -c "$1" - else - sh -c "$1" - fi -} - -# Execute all executable files in a given directory in alphanumeric order -run_path() { - local hook_folder_path="/docker-entrypoint-hooks.d/$1" - local return_code=0 - - if ! [ -d "${hook_folder_path}" ]; then - echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" - return 0 - fi - - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do - if ! [ -x "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" - continue - fi - - echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" - - run_as "${script_file_path}" || return_code="$?" - - if [ "${return_code}" -ne "0" ]; then - echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" - exit 1 - fi - - echo "==> Finished the script: \"${script_file_path}\"" - done - ) -} - -# usage: file_env VAR [DEFAULT] -# ie: file_env 'XYZ_DB_PASSWORD' 'example' -# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of -# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) -file_env() { - local var="$1" - local fileVar="${var}_FILE" - local def="${2:-}" - local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") - local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") - if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then - echo >&2 "error: both $var and $fileVar are set (but are exclusive)" - exit 1 - fi - if [ -n "${varValue}" ]; then - export "$var"="${varValue}" - elif [ -n "${fileVarValue}" ]; then - export "$var"="$(cat "${fileVarValue}")" - elif [ -n "${def}" ]; then - export "$var"="$def" - fi - unset "$fileVar" -} - -if expr "$1" : "apache" 1>/dev/null; then - if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then - a2disconf remoteip - fi -fi - -if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then - uid="$(id -u)" - gid="$(id -g)" - if [ "$uid" = '0' ]; then - case "$1" in - apache2*) - user="${APACHE_RUN_USER:-www-data}" - group="${APACHE_RUN_GROUP:-www-data}" - - # strip off any '#' symbol ('#1000' is valid syntax for Apache) - user="${user#'#'}" - group="${group#'#'}" - ;; - *) # php-fpm - user='www-data' - group='www-data' - ;; - esac - else - user="$uid" - group="$gid" - fi - - if [ -n "${REDIS_HOST+x}" ]; then - - echo "Configuring Redis as session handler" - { - file_env REDIS_HOST_PASSWORD - echo 'session.save_handler = redis' - # check if redis host is an unix socket path - if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then - if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" - else - echo "session.save_path = \"unix://${REDIS_HOST}\"" - 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}\"" - else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" - 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. - ( - if ! flock -n 9; then - # If we couldn't get it immediately, show a message, then wait for real - echo "Another process is initializing Nextcloud. Waiting..." - flock 9 - fi - - installed_version="0.0.0.0" - if [ -f /var/www/html/version.php ]; then - # shellcheck disable=SC2016 - installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" - fi - # shellcheck disable=SC2016 - image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" - - if version_greater "$installed_version" "$image_version"; then - echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" - exit 1 - fi - - if version_greater "$image_version" "$installed_version"; then - echo "Initializing nextcloud $image_version ..." - if [ "$installed_version" != "0.0.0.0" ]; then - if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then - echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." - echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." - exit 1 - fi - echo "Upgrading nextcloud from $installed_version ..." - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before - fi - if [ "$(id -u)" = 0 ]; then - rsync_options="-rlDog --chown $user:$group" - else - rsync_options="-rlD" - fi - - rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ - for dir in config data custom_apps themes; do - if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then - rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - fi - done - rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - - # Install - if [ "$installed_version" = "0.0.0.0" ]; then - echo "New nextcloud instance" - - file_env NEXTCLOUD_ADMIN_PASSWORD - file_env NEXTCLOUD_ADMIN_USER - - if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then - # shellcheck disable=SC2016 - install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' - if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then - # shellcheck disable=SC2016 - install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' - fi - - file_env MYSQL_DATABASE - file_env MYSQL_PASSWORD - file_env MYSQL_USER - file_env POSTGRES_DB - file_env POSTGRES_PASSWORD - file_env POSTGRES_USER - - install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then - echo "Installing with SQLite database" - # shellcheck disable=SC2016 - install_options=$install_options' --database-name "$SQLITE_DATABASE"' - install=true - elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then - echo "Installing with MySQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' - install=true - elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then - echo "Installing with PostgreSQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' - install=true - fi - - if [ "$install" = true ]; then - run_path pre-installation - - echo "Starting nextcloud installation" - max_retries=10 - try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] - do - echo "Retrying install..." - try=$((try+1)) - sleep 10s - done - if [ "$try" -gt "$max_retries" ]; then - echo "Installing of nextcloud failed!" - exit 1 - fi - if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then - echo "Setting trusted domains…" - NC_TRUSTED_DOMAIN_IDX=1 - for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do - DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') - run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" - NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) - done - fi - - run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi - fi - # Upgrade - else - run_path pre-upgrade - - run_as 'php /var/www/html/occ upgrade' - - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after - echo "The following apps have been disabled:" - diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 - rm -f /tmp/list_before /tmp/list_after - - run_path post-upgrade - fi - - echo "Initializing finished" - fi - - # Update htaccess after init if requested - if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then - run_as 'php /var/www/html/occ maintenance:update:htaccess' - fi - ) 9> /var/www/html/nextcloud-init-sync.lock - - run_path before-starting -fi - -exec "$@" diff --git a/25/fpm/upgrade.exclude b/25/fpm/upgrade.exclude deleted file mode 100644 index 31ce39a8..00000000 --- a/25/fpm/upgrade.exclude +++ /dev/null @@ -1,6 +0,0 @@ -/config/ -/data/ -/custom_apps/ -/themes/ -/version.php -/nextcloud-init-sync.lock diff --git a/update.sh b/update.sh index f5e6f019..9556d8ce 100755 --- a/update.sh +++ b/update.sh @@ -2,17 +2,14 @@ set -eo pipefail declare -A alpine_version=( - [25]='3.16' [default]='3.18' ) declare -A debian_version=( - [25]='bullseye' [default]='bookworm' ) declare -A php_version=( - [25]='8.1' [default]='8.2' ) @@ -87,7 +84,7 @@ variants=( fpm-alpine ) -min_version='25' +min_version='26' # version_greater_or_equal A B returns whether A >= B function version_greater_or_equal() { @@ -112,14 +109,6 @@ function create_variant() { echo "updating $fullversion [$1] $variant" - # Apply version+variant-specific patches - case "$version" in - 25) - # Nextcloud 26+ recommends sysvsem - sed -ri -e '/sysvsem/d' "$dir/Dockerfile" - ;; - esac - # Replace the variables. sed -ri -e ' s/%%ALPINE_VERSION%%/'"$alpineVersion"'/g; diff --git a/versions.json b/versions.json index 8f640d43..75c96c4b 100644 --- a/versions.json +++ b/versions.json @@ -50,31 +50,5 @@ "phpVersion": "8.2" } } - }, - "25": { - "branch": "25", - "version": "25.0.13", - "url": "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-25.0.13.tar.bz2.asc", - "variants": { - "apache": { - "variant": "apache", - "base": "debian", - "baseVersion": "bullseye", - "phpVersion": "8.1" - }, - "fpm": { - "variant": "fpm", - "base": "debian", - "baseVersion": "bullseye", - "phpVersion": "8.1" - }, - "fpm-alpine": { - "variant": "fpm-alpine", - "base": "alpine", - "baseVersion": "3.16", - "phpVersion": "8.1" - } - } } } From ed6c68451d1fc60e401178d1ad8d855c25d7fefb Mon Sep 17 00:00:00 2001 From: Josh Richards Date: Mon, 11 Dec 2023 17:54:39 -0500 Subject: [PATCH 011/123] feat(updater): Disable web based updater for real (#2109) Web based updates aren't used in the image, but the button remains enabled and generates an error when clicked. Let's eliminate the web updater button. Signed-off-by: Josh Richards --- .config/upgrade-disable-web.config.php | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .config/upgrade-disable-web.config.php diff --git a/.config/upgrade-disable-web.config.php b/.config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/.config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); From 488a855c49140fbce4c4dd7637b6ffe7a4b725be Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Mon, 11 Dec 2023 22:54:55 +0000 Subject: [PATCH 012/123] Runs update.sh --- 26/apache/config/upgrade-disable-web.config.php | 4 ++++ 26/fpm-alpine/config/upgrade-disable-web.config.php | 4 ++++ 26/fpm/config/upgrade-disable-web.config.php | 4 ++++ 27/apache/config/upgrade-disable-web.config.php | 4 ++++ 27/fpm-alpine/config/upgrade-disable-web.config.php | 4 ++++ 27/fpm/config/upgrade-disable-web.config.php | 4 ++++ 6 files changed, 24 insertions(+) create mode 100644 26/apache/config/upgrade-disable-web.config.php create mode 100644 26/fpm-alpine/config/upgrade-disable-web.config.php create mode 100644 26/fpm/config/upgrade-disable-web.config.php create mode 100644 27/apache/config/upgrade-disable-web.config.php create mode 100644 27/fpm-alpine/config/upgrade-disable-web.config.php create mode 100644 27/fpm/config/upgrade-disable-web.config.php diff --git a/26/apache/config/upgrade-disable-web.config.php b/26/apache/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/26/apache/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/26/fpm-alpine/config/upgrade-disable-web.config.php b/26/fpm-alpine/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/26/fpm-alpine/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/26/fpm/config/upgrade-disable-web.config.php b/26/fpm/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/26/fpm/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/27/apache/config/upgrade-disable-web.config.php b/27/apache/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/27/apache/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/27/fpm-alpine/config/upgrade-disable-web.config.php b/27/fpm-alpine/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/27/fpm-alpine/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/27/fpm/config/upgrade-disable-web.config.php b/27/fpm/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/27/fpm/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); From d4f83969cf8b2e95f66cd6b1716a1e0aa19958a2 Mon Sep 17 00:00:00 2001 From: J0WI Date: Tue, 12 Dec 2023 19:26:17 +0000 Subject: [PATCH 013/123] Bump to 27.1.4 Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 0a880544..64ba984e 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='27.1.3' +stable_channel='27.1.4' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From e6510ac5947c11258f7d910aed3a1ce8d0faa2c3 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Tue, 12 Dec 2023 19:26:33 +0000 Subject: [PATCH 014/123] Runs update.sh --- 28/apache/Dockerfile | 172 +++++++++++ .../config/apache-pretty-urls.config.php | 4 + 28/apache/config/apcu.config.php | 4 + 28/apache/config/apps.config.php | 15 + 28/apache/config/autoconfig.php | 41 +++ 28/apache/config/redis.config.php | 17 ++ 28/apache/config/reverse-proxy.config.php | 30 ++ 28/apache/config/s3.config.php | 41 +++ 28/apache/config/smtp.config.php | 22 ++ 28/apache/config/swift.config.php | 31 ++ .../config/upgrade-disable-web.config.php | 4 + 28/apache/cron.sh | 4 + 28/apache/entrypoint.sh | 279 ++++++++++++++++++ 28/apache/upgrade.exclude | 6 + 28/fpm-alpine/Dockerfile | 141 +++++++++ 28/fpm-alpine/config/apcu.config.php | 4 + 28/fpm-alpine/config/apps.config.php | 15 + 28/fpm-alpine/config/autoconfig.php | 41 +++ 28/fpm-alpine/config/redis.config.php | 17 ++ 28/fpm-alpine/config/reverse-proxy.config.php | 30 ++ 28/fpm-alpine/config/s3.config.php | 41 +++ 28/fpm-alpine/config/smtp.config.php | 22 ++ 28/fpm-alpine/config/swift.config.php | 31 ++ .../config/upgrade-disable-web.config.php | 4 + 28/fpm-alpine/cron.sh | 4 + 28/fpm-alpine/entrypoint.sh | 279 ++++++++++++++++++ 28/fpm-alpine/upgrade.exclude | 6 + 28/fpm/Dockerfile | 157 ++++++++++ 28/fpm/config/apcu.config.php | 4 + 28/fpm/config/apps.config.php | 15 + 28/fpm/config/autoconfig.php | 41 +++ 28/fpm/config/redis.config.php | 17 ++ 28/fpm/config/reverse-proxy.config.php | 30 ++ 28/fpm/config/s3.config.php | 41 +++ 28/fpm/config/smtp.config.php | 22 ++ 28/fpm/config/swift.config.php | 31 ++ 28/fpm/config/upgrade-disable-web.config.php | 4 + 28/fpm/cron.sh | 4 + 28/fpm/entrypoint.sh | 279 ++++++++++++++++++ 28/fpm/upgrade.exclude | 6 + latest.txt | 2 +- versions.json | 26 ++ 42 files changed, 1983 insertions(+), 1 deletion(-) create mode 100644 28/apache/Dockerfile create mode 100644 28/apache/config/apache-pretty-urls.config.php create mode 100644 28/apache/config/apcu.config.php create mode 100644 28/apache/config/apps.config.php create mode 100644 28/apache/config/autoconfig.php create mode 100644 28/apache/config/redis.config.php create mode 100644 28/apache/config/reverse-proxy.config.php create mode 100644 28/apache/config/s3.config.php create mode 100644 28/apache/config/smtp.config.php create mode 100644 28/apache/config/swift.config.php create mode 100644 28/apache/config/upgrade-disable-web.config.php create mode 100755 28/apache/cron.sh create mode 100755 28/apache/entrypoint.sh create mode 100644 28/apache/upgrade.exclude create mode 100644 28/fpm-alpine/Dockerfile create mode 100644 28/fpm-alpine/config/apcu.config.php create mode 100644 28/fpm-alpine/config/apps.config.php create mode 100644 28/fpm-alpine/config/autoconfig.php create mode 100644 28/fpm-alpine/config/redis.config.php create mode 100644 28/fpm-alpine/config/reverse-proxy.config.php create mode 100644 28/fpm-alpine/config/s3.config.php create mode 100644 28/fpm-alpine/config/smtp.config.php create mode 100644 28/fpm-alpine/config/swift.config.php create mode 100644 28/fpm-alpine/config/upgrade-disable-web.config.php create mode 100755 28/fpm-alpine/cron.sh create mode 100755 28/fpm-alpine/entrypoint.sh create mode 100644 28/fpm-alpine/upgrade.exclude create mode 100644 28/fpm/Dockerfile create mode 100644 28/fpm/config/apcu.config.php create mode 100644 28/fpm/config/apps.config.php create mode 100644 28/fpm/config/autoconfig.php create mode 100644 28/fpm/config/redis.config.php create mode 100644 28/fpm/config/reverse-proxy.config.php create mode 100644 28/fpm/config/s3.config.php create mode 100644 28/fpm/config/smtp.config.php create mode 100644 28/fpm/config/swift.config.php create mode 100644 28/fpm/config/upgrade-disable-web.config.php create mode 100755 28/fpm/cron.sh create mode 100755 28/fpm/entrypoint.sh create mode 100644 28/fpm/upgrade.exclude diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile new file mode 100644 index 00000000..98a2e546 --- /dev/null +++ b/28/apache/Dockerfile @@ -0,0 +1,172 @@ +# DO NOT EDIT: created by update.sh from Dockerfile-debian.template +FROM php:8.2-apache-bookworm + +# entrypoint.sh and cron.sh dependencies +RUN set -ex; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + busybox-static \ + bzip2 \ + libldap-common \ + libmagickcore-6.q16-6-extra \ + rsync \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ + mkdir -p /var/spool/cron/crontabs; \ + echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data + +# install the PHP extensions we need +# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html +ENV PHP_MEMORY_LIMIT 512M +ENV PHP_UPLOAD_LIMIT 512M +RUN set -ex; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + libcurl4-openssl-dev \ + libevent-dev \ + libfreetype6-dev \ + libgmp-dev \ + libicu-dev \ + libjpeg-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libpng-dev \ + libpq-dev \ + libwebp-dev \ + libxml2-dev \ + libzip-dev \ + ; \ + \ + debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ + docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ + docker-php-ext-install -j "$(nproc)" \ + bcmath \ + exif \ + gd \ + gmp \ + intl \ + ldap \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + sysvsem \ + zip \ + ; \ + \ +# pecl will claim success even if one install fails, so we need to perform each install separately + pecl install APCu-5.1.23; \ + pecl install imagick-3.7.0; \ + pecl install memcached-3.2.0; \ + pecl install redis-6.0.2; \ + \ + docker-php-ext-enable \ + apcu \ + imagick \ + memcached \ + redis \ + ; \ + rm -r /tmp/pear; \ + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark; \ + ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -rt apt-mark manual; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/* + +# set recommended PHP.ini settings +# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache +RUN { \ + echo 'opcache.enable=1'; \ + echo 'opcache.interned_strings_buffer=32'; \ + echo 'opcache.max_accelerated_files=10000'; \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.save_comments=1'; \ + echo 'opcache.revalidate_freq=60'; \ + echo 'opcache.jit=1255'; \ + echo 'opcache.jit_buffer_size=128M'; \ + } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ + \ + echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ + \ + { \ + echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ + echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ + echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ + \ + mkdir /var/www/data; \ + mkdir -p /docker-entrypoint-hooks.d/pre-installation \ + /docker-entrypoint-hooks.d/post-installation \ + /docker-entrypoint-hooks.d/pre-upgrade \ + /docker-entrypoint-hooks.d/post-upgrade \ + /docker-entrypoint-hooks.d/before-starting; \ + chown -R www-data:root /var/www; \ + chmod -R g=u /var/www + +VOLUME /var/www/html + +RUN a2enmod headers rewrite remoteip ; \ + { \ + echo 'RemoteIPHeader X-Real-IP'; \ + echo 'RemoteIPInternalProxy 10.0.0.0/8'; \ + echo 'RemoteIPInternalProxy 172.16.0.0/12'; \ + echo 'RemoteIPInternalProxy 192.168.0.0/16'; \ + } > /etc/apache2/conf-available/remoteip.conf; \ + a2enconf remoteip + +# set apache config LimitRequestBody +ENV APACHE_BODY_LIMIT 1073741824 +RUN { \ + echo 'LimitRequestBody ${APACHE_BODY_LIMIT}'; \ + } > /etc/apache2/conf-available/apache-limits.conf; \ + a2enconf apache-limits + +ENV NEXTCLOUD_VERSION 28.0.0 + +RUN set -ex; \ + fetchDeps=" \ + gnupg \ + dirmngr \ + "; \ + apt-get update; \ + apt-get install -y --no-install-recommends $fetchDeps; \ + \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ +# gpg key from https://nextcloud.com/nextcloud.asc + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ + gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ + gpgconf --kill all; \ + rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ + mkdir -p /usr/src/nextcloud/data; \ + 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; \ + rm -rf /var/lib/apt/lists/* + +COPY *.sh upgrade.exclude / +COPY config/* /usr/src/nextcloud/config/ + +ENTRYPOINT ["/entrypoint.sh"] +CMD ["apache2-foreground"] diff --git a/28/apache/config/apache-pretty-urls.config.php b/28/apache/config/apache-pretty-urls.config.php new file mode 100644 index 00000000..72da1d8c --- /dev/null +++ b/28/apache/config/apache-pretty-urls.config.php @@ -0,0 +1,4 @@ + '/', +); diff --git a/28/apache/config/apcu.config.php b/28/apache/config/apcu.config.php new file mode 100644 index 00000000..69fed876 --- /dev/null +++ b/28/apache/config/apcu.config.php @@ -0,0 +1,4 @@ + '\OC\Memcache\APCu', +); diff --git a/28/apache/config/apps.config.php b/28/apache/config/apps.config.php new file mode 100644 index 00000000..4c37f72a --- /dev/null +++ b/28/apache/config/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + 'path' => OC::$SERVERROOT.'/apps', + 'url' => '/apps', + 'writable' => false, + ), + 1 => array ( + 'path' => OC::$SERVERROOT.'/custom_apps', + 'url' => '/custom_apps', + 'writable' => true, + ), + ), +); diff --git a/28/apache/config/autoconfig.php b/28/apache/config/autoconfig.php new file mode 100644 index 00000000..92ad2a1c --- /dev/null +++ b/28/apache/config/autoconfig.php @@ -0,0 +1,41 @@ + '\OC\Memcache\Redis', + 'memcache.locking' => '\OC\Memcache\Redis', + 'redis' => array( + 'host' => getenv('REDIS_HOST'), + 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + ), + ); + + if (getenv('REDIS_HOST_PORT') !== false) { + $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); + } elseif (getenv('REDIS_HOST')[0] != '/') { + $CONFIG['redis']['port'] = 6379; + } +} diff --git a/28/apache/config/reverse-proxy.config.php b/28/apache/config/reverse-proxy.config.php new file mode 100644 index 00000000..7df0415e --- /dev/null +++ b/28/apache/config/reverse-proxy.config.php @@ -0,0 +1,30 @@ + array( + 'class' => '\OC\Files\ObjectStore\S3', + 'arguments' => array( + 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), + 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', + 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', + 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", + 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, + 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + // required for some non Amazon S3 implementations + 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', + // required for older protocol versions + 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' + ) + ) + ); + + if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_KEY')) { + $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); + } else { + $CONFIG['objectstore']['arguments']['key'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SECRET')) { + $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); + } else { + $CONFIG['objectstore']['arguments']['secret'] = ''; + } +} diff --git a/28/apache/config/smtp.config.php b/28/apache/config/smtp.config.php new file mode 100644 index 00000000..5006fe47 --- /dev/null +++ b/28/apache/config/smtp.config.php @@ -0,0 +1,22 @@ + 'smtp', + 'mail_smtphost' => getenv('SMTP_HOST'), + 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', + 'mail_smtpname' => getenv('SMTP_NAME') ?: '', + 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), + 'mail_domain' => getenv('MAIL_DOMAIN'), + ); + + if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); + } elseif (getenv('SMTP_PASSWORD')) { + $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); + } else { + $CONFIG['mail_smtppassword'] = ''; + } +} diff --git a/28/apache/config/swift.config.php b/28/apache/config/swift.config.php new file mode 100644 index 00000000..47ada566 --- /dev/null +++ b/28/apache/config/swift.config.php @@ -0,0 +1,31 @@ + [ + 'class' => 'OC\\Files\\ObjectStore\\Swift', + 'arguments' => [ + 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', + 'user' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), + 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', + ], + ], + 'scope' => [ + 'project' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', + ], + ], + ], + 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', + 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), + 'url' => getenv('OBJECTSTORE_SWIFT_URL'), + 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), + ] + ] + ); +} diff --git a/28/apache/config/upgrade-disable-web.config.php b/28/apache/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/28/apache/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/28/apache/cron.sh b/28/apache/cron.sh new file mode 100755 index 00000000..b4cd9af6 --- /dev/null +++ b/28/apache/cron.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -eu + +exec busybox crond -f -L /dev/stdout diff --git a/28/apache/entrypoint.sh b/28/apache/entrypoint.sh new file mode 100755 index 00000000..edb539a0 --- /dev/null +++ b/28/apache/entrypoint.sh @@ -0,0 +1,279 @@ +#!/bin/sh +set -eu + +# version_greater A B returns whether A > B +version_greater() { + [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] +} + +# return true if specified directory is empty +directory_empty() { + [ -z "$(ls -A "$1/")" ] +} + +run_as() { + if [ "$(id -u)" = 0 ]; then + su -p "$user" -s /bin/sh -c "$1" + else + sh -c "$1" + fi +} + +# Execute all executable files in a given directory in alphanumeric order +run_path() { + local hook_folder_path="/docker-entrypoint-hooks.d/$1" + local return_code=0 + + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" + return 0 + fi + + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + + ( + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" + continue + fi + + echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" + + run_as "${script_file_path}" || return_code="$?" + + if [ "${return_code}" -ne "0" ]; then + echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" + exit 1 + fi + + echo "==> Finished the script: \"${script_file_path}\"" + done + ) +} + +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' +# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of +# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") + local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") + if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then + echo >&2 "error: both $var and $fileVar are set (but are exclusive)" + exit 1 + fi + if [ -n "${varValue}" ]; then + export "$var"="${varValue}" + elif [ -n "${fileVarValue}" ]; then + export "$var"="$(cat "${fileVarValue}")" + elif [ -n "${def}" ]; then + export "$var"="$def" + fi + unset "$fileVar" +} + +if expr "$1" : "apache" 1>/dev/null; then + if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then + a2disconf remoteip + fi +fi + +if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + uid="$(id -u)" + gid="$(id -g)" + if [ "$uid" = '0' ]; then + case "$1" in + apache2*) + user="${APACHE_RUN_USER:-www-data}" + group="${APACHE_RUN_GROUP:-www-data}" + + # strip off any '#' symbol ('#1000' is valid syntax for Apache) + user="${user#'#'}" + group="${group#'#'}" + ;; + *) # php-fpm + user='www-data' + group='www-data' + ;; + esac + else + user="$uid" + group="$gid" + fi + + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + file_env REDIS_HOST_PASSWORD + echo 'session.save_handler = redis' + # check if redis host is an unix socket path + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then + if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then + echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" + else + echo "session.save_path = \"unix://${REDIS_HOST}\"" + 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}\"" + else + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + 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. + ( + if ! flock -n 9; then + # If we couldn't get it immediately, show a message, then wait for real + echo "Another process is initializing Nextcloud. Waiting..." + flock 9 + fi + + installed_version="0.0.0.0" + if [ -f /var/www/html/version.php ]; then + # shellcheck disable=SC2016 + installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" + fi + # shellcheck disable=SC2016 + image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" + + if version_greater "$installed_version" "$image_version"; then + echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" + exit 1 + fi + + if version_greater "$image_version" "$installed_version"; then + echo "Initializing nextcloud $image_version ..." + if [ "$installed_version" != "0.0.0.0" ]; then + if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then + echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." + echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." + exit 1 + fi + echo "Upgrading nextcloud from $installed_version ..." + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before + fi + if [ "$(id -u)" = 0 ]; then + rsync_options="-rlDog --chown $user:$group" + else + rsync_options="-rlD" + fi + + rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ + for dir in config data custom_apps themes; do + if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then + rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + fi + done + rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + + # Install + if [ "$installed_version" = "0.0.0.0" ]; then + echo "New nextcloud instance" + + file_env NEXTCLOUD_ADMIN_PASSWORD + file_env NEXTCLOUD_ADMIN_USER + + if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then + # shellcheck disable=SC2016 + install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' + if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then + # shellcheck disable=SC2016 + install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' + fi + + file_env MYSQL_DATABASE + file_env MYSQL_PASSWORD + file_env MYSQL_USER + file_env POSTGRES_DB + file_env POSTGRES_PASSWORD + file_env POSTGRES_USER + + install=false + if [ -n "${SQLITE_DATABASE+x}" ]; then + echo "Installing with SQLite database" + # shellcheck disable=SC2016 + install_options=$install_options' --database-name "$SQLITE_DATABASE"' + install=true + elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then + echo "Installing with MySQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' + install=true + elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then + echo "Installing with PostgreSQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' + install=true + fi + + if [ "$install" = true ]; then + run_path pre-installation + + echo "Starting nextcloud installation" + max_retries=10 + try=0 + until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + do + echo "Retrying install..." + try=$((try+1)) + sleep 10s + done + if [ "$try" -gt "$max_retries" ]; then + echo "Installing of nextcloud failed!" + exit 1 + fi + if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then + echo "Setting trusted domains…" + NC_TRUSTED_DOMAIN_IDX=1 + for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do + DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" + NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) + done + fi + + run_path post-installation + else + echo "Please run the web-based installer on first connect!" + fi + fi + # Upgrade + else + run_path pre-upgrade + + run_as 'php /var/www/html/occ upgrade' + + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after + echo "The following apps have been disabled:" + diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 + rm -f /tmp/list_before /tmp/list_after + + run_path post-upgrade + fi + + echo "Initializing finished" + fi + + # Update htaccess after init if requested + if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then + run_as 'php /var/www/html/occ maintenance:update:htaccess' + fi + ) 9> /var/www/html/nextcloud-init-sync.lock + + run_path before-starting +fi + +exec "$@" diff --git a/28/apache/upgrade.exclude b/28/apache/upgrade.exclude new file mode 100644 index 00000000..31ce39a8 --- /dev/null +++ b/28/apache/upgrade.exclude @@ -0,0 +1,6 @@ +/config/ +/data/ +/custom_apps/ +/themes/ +/version.php +/nextcloud-init-sync.lock diff --git a/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile new file mode 100644 index 00000000..c6a0224c --- /dev/null +++ b/28/fpm-alpine/Dockerfile @@ -0,0 +1,141 @@ +# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template +FROM php:8.2-fpm-alpine3.18 + +# entrypoint.sh and cron.sh dependencies +RUN set -ex; \ + \ + apk add --no-cache \ + imagemagick \ + rsync \ + ; \ + \ + rm /var/spool/cron/crontabs/root; \ + echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data + +# install the PHP extensions we need +# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html +RUN set -ex; \ + \ + apk add --no-cache --virtual .build-deps \ + $PHPIZE_DEPS \ + autoconf \ + freetype-dev \ + gmp-dev \ + icu-dev \ + imagemagick-dev \ + libevent-dev \ + libjpeg-turbo-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libpng-dev \ + libwebp-dev \ + libxml2-dev \ + libzip-dev \ + openldap-dev \ + pcre-dev \ + postgresql-dev \ + ; \ + \ + docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ + docker-php-ext-configure ldap; \ + docker-php-ext-install -j "$(nproc)" \ + bcmath \ + exif \ + gd \ + gmp \ + intl \ + ldap \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + sysvsem \ + zip \ + ; \ + \ +# pecl will claim success even if one install fails, so we need to perform each install separately + pecl install APCu-5.1.23; \ + pecl install imagick-3.7.0; \ + pecl install memcached-3.2.0; \ + pecl install redis-6.0.2; \ + \ + docker-php-ext-enable \ + apcu \ + imagick \ + memcached \ + redis \ + ; \ + rm -r /tmp/pear; \ + \ + runDeps="$( \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ + | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ + )"; \ + apk add --no-network --virtual .nextcloud-phpext-rundeps $runDeps; \ + apk del --no-network .build-deps + +# set recommended PHP.ini settings +# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache +ENV PHP_MEMORY_LIMIT 512M +ENV PHP_UPLOAD_LIMIT 512M +RUN { \ + echo 'opcache.enable=1'; \ + echo 'opcache.interned_strings_buffer=32'; \ + echo 'opcache.max_accelerated_files=10000'; \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.save_comments=1'; \ + echo 'opcache.revalidate_freq=60'; \ + echo 'opcache.jit=1255'; \ + echo 'opcache.jit_buffer_size=128M'; \ + } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ + \ + echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ + \ + { \ + echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ + echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ + echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ + \ + mkdir /var/www/data; \ + mkdir -p /docker-entrypoint-hooks.d/pre-installation \ + /docker-entrypoint-hooks.d/post-installation \ + /docker-entrypoint-hooks.d/pre-upgrade \ + /docker-entrypoint-hooks.d/post-upgrade \ + /docker-entrypoint-hooks.d/before-starting; \ + chown -R www-data:root /var/www; \ + chmod -R g=u /var/www + +VOLUME /var/www/html + + +ENV NEXTCLOUD_VERSION 28.0.0 + +RUN set -ex; \ + apk add --no-cache --virtual .fetch-deps \ + bzip2 \ + gnupg \ + ; \ + \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ +# gpg key from https://nextcloud.com/nextcloud.asc + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ + gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ + gpgconf --kill all; \ + rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ + mkdir -p /usr/src/nextcloud/data; \ + mkdir -p /usr/src/nextcloud/custom_apps; \ + chmod +x /usr/src/nextcloud/occ; \ + apk del --no-network .fetch-deps + +COPY *.sh upgrade.exclude / +COPY config/* /usr/src/nextcloud/config/ + +ENTRYPOINT ["/entrypoint.sh"] +CMD ["php-fpm"] diff --git a/28/fpm-alpine/config/apcu.config.php b/28/fpm-alpine/config/apcu.config.php new file mode 100644 index 00000000..69fed876 --- /dev/null +++ b/28/fpm-alpine/config/apcu.config.php @@ -0,0 +1,4 @@ + '\OC\Memcache\APCu', +); diff --git a/28/fpm-alpine/config/apps.config.php b/28/fpm-alpine/config/apps.config.php new file mode 100644 index 00000000..4c37f72a --- /dev/null +++ b/28/fpm-alpine/config/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + 'path' => OC::$SERVERROOT.'/apps', + 'url' => '/apps', + 'writable' => false, + ), + 1 => array ( + 'path' => OC::$SERVERROOT.'/custom_apps', + 'url' => '/custom_apps', + 'writable' => true, + ), + ), +); diff --git a/28/fpm-alpine/config/autoconfig.php b/28/fpm-alpine/config/autoconfig.php new file mode 100644 index 00000000..92ad2a1c --- /dev/null +++ b/28/fpm-alpine/config/autoconfig.php @@ -0,0 +1,41 @@ + '\OC\Memcache\Redis', + 'memcache.locking' => '\OC\Memcache\Redis', + 'redis' => array( + 'host' => getenv('REDIS_HOST'), + 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + ), + ); + + if (getenv('REDIS_HOST_PORT') !== false) { + $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); + } elseif (getenv('REDIS_HOST')[0] != '/') { + $CONFIG['redis']['port'] = 6379; + } +} diff --git a/28/fpm-alpine/config/reverse-proxy.config.php b/28/fpm-alpine/config/reverse-proxy.config.php new file mode 100644 index 00000000..7df0415e --- /dev/null +++ b/28/fpm-alpine/config/reverse-proxy.config.php @@ -0,0 +1,30 @@ + array( + 'class' => '\OC\Files\ObjectStore\S3', + 'arguments' => array( + 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), + 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', + 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', + 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", + 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, + 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + // required for some non Amazon S3 implementations + 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', + // required for older protocol versions + 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' + ) + ) + ); + + if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_KEY')) { + $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); + } else { + $CONFIG['objectstore']['arguments']['key'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SECRET')) { + $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); + } else { + $CONFIG['objectstore']['arguments']['secret'] = ''; + } +} diff --git a/28/fpm-alpine/config/smtp.config.php b/28/fpm-alpine/config/smtp.config.php new file mode 100644 index 00000000..5006fe47 --- /dev/null +++ b/28/fpm-alpine/config/smtp.config.php @@ -0,0 +1,22 @@ + 'smtp', + 'mail_smtphost' => getenv('SMTP_HOST'), + 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', + 'mail_smtpname' => getenv('SMTP_NAME') ?: '', + 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), + 'mail_domain' => getenv('MAIL_DOMAIN'), + ); + + if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); + } elseif (getenv('SMTP_PASSWORD')) { + $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); + } else { + $CONFIG['mail_smtppassword'] = ''; + } +} diff --git a/28/fpm-alpine/config/swift.config.php b/28/fpm-alpine/config/swift.config.php new file mode 100644 index 00000000..47ada566 --- /dev/null +++ b/28/fpm-alpine/config/swift.config.php @@ -0,0 +1,31 @@ + [ + 'class' => 'OC\\Files\\ObjectStore\\Swift', + 'arguments' => [ + 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', + 'user' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), + 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', + ], + ], + 'scope' => [ + 'project' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', + ], + ], + ], + 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', + 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), + 'url' => getenv('OBJECTSTORE_SWIFT_URL'), + 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), + ] + ] + ); +} diff --git a/28/fpm-alpine/config/upgrade-disable-web.config.php b/28/fpm-alpine/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/28/fpm-alpine/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/28/fpm-alpine/cron.sh b/28/fpm-alpine/cron.sh new file mode 100755 index 00000000..b4cd9af6 --- /dev/null +++ b/28/fpm-alpine/cron.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -eu + +exec busybox crond -f -L /dev/stdout diff --git a/28/fpm-alpine/entrypoint.sh b/28/fpm-alpine/entrypoint.sh new file mode 100755 index 00000000..edb539a0 --- /dev/null +++ b/28/fpm-alpine/entrypoint.sh @@ -0,0 +1,279 @@ +#!/bin/sh +set -eu + +# version_greater A B returns whether A > B +version_greater() { + [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] +} + +# return true if specified directory is empty +directory_empty() { + [ -z "$(ls -A "$1/")" ] +} + +run_as() { + if [ "$(id -u)" = 0 ]; then + su -p "$user" -s /bin/sh -c "$1" + else + sh -c "$1" + fi +} + +# Execute all executable files in a given directory in alphanumeric order +run_path() { + local hook_folder_path="/docker-entrypoint-hooks.d/$1" + local return_code=0 + + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" + return 0 + fi + + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + + ( + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" + continue + fi + + echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" + + run_as "${script_file_path}" || return_code="$?" + + if [ "${return_code}" -ne "0" ]; then + echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" + exit 1 + fi + + echo "==> Finished the script: \"${script_file_path}\"" + done + ) +} + +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' +# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of +# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") + local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") + if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then + echo >&2 "error: both $var and $fileVar are set (but are exclusive)" + exit 1 + fi + if [ -n "${varValue}" ]; then + export "$var"="${varValue}" + elif [ -n "${fileVarValue}" ]; then + export "$var"="$(cat "${fileVarValue}")" + elif [ -n "${def}" ]; then + export "$var"="$def" + fi + unset "$fileVar" +} + +if expr "$1" : "apache" 1>/dev/null; then + if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then + a2disconf remoteip + fi +fi + +if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + uid="$(id -u)" + gid="$(id -g)" + if [ "$uid" = '0' ]; then + case "$1" in + apache2*) + user="${APACHE_RUN_USER:-www-data}" + group="${APACHE_RUN_GROUP:-www-data}" + + # strip off any '#' symbol ('#1000' is valid syntax for Apache) + user="${user#'#'}" + group="${group#'#'}" + ;; + *) # php-fpm + user='www-data' + group='www-data' + ;; + esac + else + user="$uid" + group="$gid" + fi + + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + file_env REDIS_HOST_PASSWORD + echo 'session.save_handler = redis' + # check if redis host is an unix socket path + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then + if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then + echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" + else + echo "session.save_path = \"unix://${REDIS_HOST}\"" + 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}\"" + else + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + 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. + ( + if ! flock -n 9; then + # If we couldn't get it immediately, show a message, then wait for real + echo "Another process is initializing Nextcloud. Waiting..." + flock 9 + fi + + installed_version="0.0.0.0" + if [ -f /var/www/html/version.php ]; then + # shellcheck disable=SC2016 + installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" + fi + # shellcheck disable=SC2016 + image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" + + if version_greater "$installed_version" "$image_version"; then + echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" + exit 1 + fi + + if version_greater "$image_version" "$installed_version"; then + echo "Initializing nextcloud $image_version ..." + if [ "$installed_version" != "0.0.0.0" ]; then + if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then + echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." + echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." + exit 1 + fi + echo "Upgrading nextcloud from $installed_version ..." + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before + fi + if [ "$(id -u)" = 0 ]; then + rsync_options="-rlDog --chown $user:$group" + else + rsync_options="-rlD" + fi + + rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ + for dir in config data custom_apps themes; do + if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then + rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + fi + done + rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + + # Install + if [ "$installed_version" = "0.0.0.0" ]; then + echo "New nextcloud instance" + + file_env NEXTCLOUD_ADMIN_PASSWORD + file_env NEXTCLOUD_ADMIN_USER + + if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then + # shellcheck disable=SC2016 + install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' + if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then + # shellcheck disable=SC2016 + install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' + fi + + file_env MYSQL_DATABASE + file_env MYSQL_PASSWORD + file_env MYSQL_USER + file_env POSTGRES_DB + file_env POSTGRES_PASSWORD + file_env POSTGRES_USER + + install=false + if [ -n "${SQLITE_DATABASE+x}" ]; then + echo "Installing with SQLite database" + # shellcheck disable=SC2016 + install_options=$install_options' --database-name "$SQLITE_DATABASE"' + install=true + elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then + echo "Installing with MySQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' + install=true + elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then + echo "Installing with PostgreSQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' + install=true + fi + + if [ "$install" = true ]; then + run_path pre-installation + + echo "Starting nextcloud installation" + max_retries=10 + try=0 + until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + do + echo "Retrying install..." + try=$((try+1)) + sleep 10s + done + if [ "$try" -gt "$max_retries" ]; then + echo "Installing of nextcloud failed!" + exit 1 + fi + if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then + echo "Setting trusted domains…" + NC_TRUSTED_DOMAIN_IDX=1 + for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do + DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" + NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) + done + fi + + run_path post-installation + else + echo "Please run the web-based installer on first connect!" + fi + fi + # Upgrade + else + run_path pre-upgrade + + run_as 'php /var/www/html/occ upgrade' + + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after + echo "The following apps have been disabled:" + diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 + rm -f /tmp/list_before /tmp/list_after + + run_path post-upgrade + fi + + echo "Initializing finished" + fi + + # Update htaccess after init if requested + if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then + run_as 'php /var/www/html/occ maintenance:update:htaccess' + fi + ) 9> /var/www/html/nextcloud-init-sync.lock + + run_path before-starting +fi + +exec "$@" diff --git a/28/fpm-alpine/upgrade.exclude b/28/fpm-alpine/upgrade.exclude new file mode 100644 index 00000000..31ce39a8 --- /dev/null +++ b/28/fpm-alpine/upgrade.exclude @@ -0,0 +1,6 @@ +/config/ +/data/ +/custom_apps/ +/themes/ +/version.php +/nextcloud-init-sync.lock diff --git a/28/fpm/Dockerfile b/28/fpm/Dockerfile new file mode 100644 index 00000000..3d1c1bb4 --- /dev/null +++ b/28/fpm/Dockerfile @@ -0,0 +1,157 @@ +# DO NOT EDIT: created by update.sh from Dockerfile-debian.template +FROM php:8.2-fpm-bookworm + +# entrypoint.sh and cron.sh dependencies +RUN set -ex; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + busybox-static \ + bzip2 \ + libldap-common \ + libmagickcore-6.q16-6-extra \ + rsync \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ + mkdir -p /var/spool/cron/crontabs; \ + echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data + +# install the PHP extensions we need +# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html +ENV PHP_MEMORY_LIMIT 512M +ENV PHP_UPLOAD_LIMIT 512M +RUN set -ex; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + libcurl4-openssl-dev \ + libevent-dev \ + libfreetype6-dev \ + libgmp-dev \ + libicu-dev \ + libjpeg-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libpng-dev \ + libpq-dev \ + libwebp-dev \ + libxml2-dev \ + libzip-dev \ + ; \ + \ + debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ + docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ + docker-php-ext-install -j "$(nproc)" \ + bcmath \ + exif \ + gd \ + gmp \ + intl \ + ldap \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + sysvsem \ + zip \ + ; \ + \ +# pecl will claim success even if one install fails, so we need to perform each install separately + pecl install APCu-5.1.23; \ + pecl install imagick-3.7.0; \ + pecl install memcached-3.2.0; \ + pecl install redis-6.0.2; \ + \ + docker-php-ext-enable \ + apcu \ + imagick \ + memcached \ + redis \ + ; \ + rm -r /tmp/pear; \ + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark; \ + ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -rt apt-mark manual; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/* + +# set recommended PHP.ini settings +# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache +RUN { \ + echo 'opcache.enable=1'; \ + echo 'opcache.interned_strings_buffer=32'; \ + echo 'opcache.max_accelerated_files=10000'; \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.save_comments=1'; \ + echo 'opcache.revalidate_freq=60'; \ + echo 'opcache.jit=1255'; \ + echo 'opcache.jit_buffer_size=128M'; \ + } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ + \ + echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ + \ + { \ + echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ + echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ + echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ + \ + mkdir /var/www/data; \ + mkdir -p /docker-entrypoint-hooks.d/pre-installation \ + /docker-entrypoint-hooks.d/post-installation \ + /docker-entrypoint-hooks.d/pre-upgrade \ + /docker-entrypoint-hooks.d/post-upgrade \ + /docker-entrypoint-hooks.d/before-starting; \ + chown -R www-data:root /var/www; \ + chmod -R g=u /var/www + +VOLUME /var/www/html + + +ENV NEXTCLOUD_VERSION 28.0.0 + +RUN set -ex; \ + fetchDeps=" \ + gnupg \ + dirmngr \ + "; \ + apt-get update; \ + apt-get install -y --no-install-recommends $fetchDeps; \ + \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ +# gpg key from https://nextcloud.com/nextcloud.asc + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ + gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ + gpgconf --kill all; \ + rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ + mkdir -p /usr/src/nextcloud/data; \ + 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; \ + rm -rf /var/lib/apt/lists/* + +COPY *.sh upgrade.exclude / +COPY config/* /usr/src/nextcloud/config/ + +ENTRYPOINT ["/entrypoint.sh"] +CMD ["php-fpm"] diff --git a/28/fpm/config/apcu.config.php b/28/fpm/config/apcu.config.php new file mode 100644 index 00000000..69fed876 --- /dev/null +++ b/28/fpm/config/apcu.config.php @@ -0,0 +1,4 @@ + '\OC\Memcache\APCu', +); diff --git a/28/fpm/config/apps.config.php b/28/fpm/config/apps.config.php new file mode 100644 index 00000000..4c37f72a --- /dev/null +++ b/28/fpm/config/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + 'path' => OC::$SERVERROOT.'/apps', + 'url' => '/apps', + 'writable' => false, + ), + 1 => array ( + 'path' => OC::$SERVERROOT.'/custom_apps', + 'url' => '/custom_apps', + 'writable' => true, + ), + ), +); diff --git a/28/fpm/config/autoconfig.php b/28/fpm/config/autoconfig.php new file mode 100644 index 00000000..92ad2a1c --- /dev/null +++ b/28/fpm/config/autoconfig.php @@ -0,0 +1,41 @@ + '\OC\Memcache\Redis', + 'memcache.locking' => '\OC\Memcache\Redis', + 'redis' => array( + 'host' => getenv('REDIS_HOST'), + 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + ), + ); + + if (getenv('REDIS_HOST_PORT') !== false) { + $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); + } elseif (getenv('REDIS_HOST')[0] != '/') { + $CONFIG['redis']['port'] = 6379; + } +} diff --git a/28/fpm/config/reverse-proxy.config.php b/28/fpm/config/reverse-proxy.config.php new file mode 100644 index 00000000..7df0415e --- /dev/null +++ b/28/fpm/config/reverse-proxy.config.php @@ -0,0 +1,30 @@ + array( + 'class' => '\OC\Files\ObjectStore\S3', + 'arguments' => array( + 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), + 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', + 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', + 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", + 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, + 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + // required for some non Amazon S3 implementations + 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', + // required for older protocol versions + 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' + ) + ) + ); + + if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_KEY')) { + $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); + } else { + $CONFIG['objectstore']['arguments']['key'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SECRET')) { + $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); + } else { + $CONFIG['objectstore']['arguments']['secret'] = ''; + } +} diff --git a/28/fpm/config/smtp.config.php b/28/fpm/config/smtp.config.php new file mode 100644 index 00000000..5006fe47 --- /dev/null +++ b/28/fpm/config/smtp.config.php @@ -0,0 +1,22 @@ + 'smtp', + 'mail_smtphost' => getenv('SMTP_HOST'), + 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', + 'mail_smtpname' => getenv('SMTP_NAME') ?: '', + 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), + 'mail_domain' => getenv('MAIL_DOMAIN'), + ); + + if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); + } elseif (getenv('SMTP_PASSWORD')) { + $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); + } else { + $CONFIG['mail_smtppassword'] = ''; + } +} diff --git a/28/fpm/config/swift.config.php b/28/fpm/config/swift.config.php new file mode 100644 index 00000000..47ada566 --- /dev/null +++ b/28/fpm/config/swift.config.php @@ -0,0 +1,31 @@ + [ + 'class' => 'OC\\Files\\ObjectStore\\Swift', + 'arguments' => [ + 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', + 'user' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), + 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', + ], + ], + 'scope' => [ + 'project' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', + ], + ], + ], + 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', + 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), + 'url' => getenv('OBJECTSTORE_SWIFT_URL'), + 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), + ] + ] + ); +} diff --git a/28/fpm/config/upgrade-disable-web.config.php b/28/fpm/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/28/fpm/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/28/fpm/cron.sh b/28/fpm/cron.sh new file mode 100755 index 00000000..b4cd9af6 --- /dev/null +++ b/28/fpm/cron.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -eu + +exec busybox crond -f -L /dev/stdout diff --git a/28/fpm/entrypoint.sh b/28/fpm/entrypoint.sh new file mode 100755 index 00000000..edb539a0 --- /dev/null +++ b/28/fpm/entrypoint.sh @@ -0,0 +1,279 @@ +#!/bin/sh +set -eu + +# version_greater A B returns whether A > B +version_greater() { + [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] +} + +# return true if specified directory is empty +directory_empty() { + [ -z "$(ls -A "$1/")" ] +} + +run_as() { + if [ "$(id -u)" = 0 ]; then + su -p "$user" -s /bin/sh -c "$1" + else + sh -c "$1" + fi +} + +# Execute all executable files in a given directory in alphanumeric order +run_path() { + local hook_folder_path="/docker-entrypoint-hooks.d/$1" + local return_code=0 + + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" + return 0 + fi + + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + + ( + find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" + continue + fi + + echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" + + run_as "${script_file_path}" || return_code="$?" + + if [ "${return_code}" -ne "0" ]; then + echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" + exit 1 + fi + + echo "==> Finished the script: \"${script_file_path}\"" + done + ) +} + +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' +# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of +# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") + local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") + if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then + echo >&2 "error: both $var and $fileVar are set (but are exclusive)" + exit 1 + fi + if [ -n "${varValue}" ]; then + export "$var"="${varValue}" + elif [ -n "${fileVarValue}" ]; then + export "$var"="$(cat "${fileVarValue}")" + elif [ -n "${def}" ]; then + export "$var"="$def" + fi + unset "$fileVar" +} + +if expr "$1" : "apache" 1>/dev/null; then + if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then + a2disconf remoteip + fi +fi + +if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + uid="$(id -u)" + gid="$(id -g)" + if [ "$uid" = '0' ]; then + case "$1" in + apache2*) + user="${APACHE_RUN_USER:-www-data}" + group="${APACHE_RUN_GROUP:-www-data}" + + # strip off any '#' symbol ('#1000' is valid syntax for Apache) + user="${user#'#'}" + group="${group#'#'}" + ;; + *) # php-fpm + user='www-data' + group='www-data' + ;; + esac + else + user="$uid" + group="$gid" + fi + + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + file_env REDIS_HOST_PASSWORD + echo 'session.save_handler = redis' + # check if redis host is an unix socket path + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then + if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then + echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" + else + echo "session.save_path = \"unix://${REDIS_HOST}\"" + 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}\"" + else + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + 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. + ( + if ! flock -n 9; then + # If we couldn't get it immediately, show a message, then wait for real + echo "Another process is initializing Nextcloud. Waiting..." + flock 9 + fi + + installed_version="0.0.0.0" + if [ -f /var/www/html/version.php ]; then + # shellcheck disable=SC2016 + installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" + fi + # shellcheck disable=SC2016 + image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" + + if version_greater "$installed_version" "$image_version"; then + echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" + exit 1 + fi + + if version_greater "$image_version" "$installed_version"; then + echo "Initializing nextcloud $image_version ..." + if [ "$installed_version" != "0.0.0.0" ]; then + if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then + echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." + echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." + exit 1 + fi + echo "Upgrading nextcloud from $installed_version ..." + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before + fi + if [ "$(id -u)" = 0 ]; then + rsync_options="-rlDog --chown $user:$group" + else + rsync_options="-rlD" + fi + + rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ + for dir in config data custom_apps themes; do + if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then + rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + fi + done + rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + + # Install + if [ "$installed_version" = "0.0.0.0" ]; then + echo "New nextcloud instance" + + file_env NEXTCLOUD_ADMIN_PASSWORD + file_env NEXTCLOUD_ADMIN_USER + + if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then + # shellcheck disable=SC2016 + install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' + if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then + # shellcheck disable=SC2016 + install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' + fi + + file_env MYSQL_DATABASE + file_env MYSQL_PASSWORD + file_env MYSQL_USER + file_env POSTGRES_DB + file_env POSTGRES_PASSWORD + file_env POSTGRES_USER + + install=false + if [ -n "${SQLITE_DATABASE+x}" ]; then + echo "Installing with SQLite database" + # shellcheck disable=SC2016 + install_options=$install_options' --database-name "$SQLITE_DATABASE"' + install=true + elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then + echo "Installing with MySQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' + install=true + elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then + echo "Installing with PostgreSQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' + install=true + fi + + if [ "$install" = true ]; then + run_path pre-installation + + echo "Starting nextcloud installation" + max_retries=10 + try=0 + until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + do + echo "Retrying install..." + try=$((try+1)) + sleep 10s + done + if [ "$try" -gt "$max_retries" ]; then + echo "Installing of nextcloud failed!" + exit 1 + fi + if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then + echo "Setting trusted domains…" + NC_TRUSTED_DOMAIN_IDX=1 + for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do + DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" + NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) + done + fi + + run_path post-installation + else + echo "Please run the web-based installer on first connect!" + fi + fi + # Upgrade + else + run_path pre-upgrade + + run_as 'php /var/www/html/occ upgrade' + + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after + echo "The following apps have been disabled:" + diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 + rm -f /tmp/list_before /tmp/list_after + + run_path post-upgrade + fi + + echo "Initializing finished" + fi + + # Update htaccess after init if requested + if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then + run_as 'php /var/www/html/occ maintenance:update:htaccess' + fi + ) 9> /var/www/html/nextcloud-init-sync.lock + + run_path before-starting +fi + +exec "$@" diff --git a/28/fpm/upgrade.exclude b/28/fpm/upgrade.exclude new file mode 100644 index 00000000..31ce39a8 --- /dev/null +++ b/28/fpm/upgrade.exclude @@ -0,0 +1,6 @@ +/config/ +/data/ +/custom_apps/ +/themes/ +/version.php +/nextcloud-init-sync.lock diff --git a/latest.txt b/latest.txt index 587d8c30..0b4dfcf0 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -27.1.4 +28.0.0 diff --git a/versions.json b/versions.json index 75c96c4b..76074c88 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,30 @@ { + "28": { + "branch": "28", + "version": "28.0.0", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2.asc", + "variants": { + "apache": { + "variant": "apache", + "base": "debian", + "baseVersion": "bookworm", + "phpVersion": "8.2" + }, + "fpm": { + "variant": "fpm", + "base": "debian", + "baseVersion": "bookworm", + "phpVersion": "8.2" + }, + "fpm-alpine": { + "variant": "fpm-alpine", + "base": "alpine", + "baseVersion": "3.18", + "phpVersion": "8.2" + } + } + }, "27": { "branch": "27", "version": "27.1.4", From 4cff57305b863a4e055595bf24b04028a7547e8d Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Fri, 15 Dec 2023 00:27:36 +0000 Subject: [PATCH 015/123] Runs update.sh --- 26/apache/Dockerfile | 6 +++--- 26/fpm-alpine/Dockerfile | 6 +++--- 26/fpm/Dockerfile | 6 +++--- 27/apache/Dockerfile | 6 +++--- 27/fpm-alpine/Dockerfile | 6 +++--- 27/fpm/Dockerfile | 6 +++--- versions.json | 12 ++++++------ 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/26/apache/Dockerfile b/26/apache/Dockerfile index c87c35a5..cc287529 100644 --- a/26/apache/Dockerfile +++ b/26/apache/Dockerfile @@ -138,7 +138,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 26.0.9 +ENV NEXTCLOUD_VERSION 26.0.10 RUN set -ex; \ fetchDeps=" \ @@ -148,8 +148,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-26.0.9.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.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/26/fpm-alpine/Dockerfile b/26/fpm-alpine/Dockerfile index 93624c90..dce75c8b 100644 --- a/26/fpm-alpine/Dockerfile +++ b/26/fpm-alpine/Dockerfile @@ -111,7 +111,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 26.0.9 +ENV NEXTCLOUD_VERSION 26.0.10 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -119,8 +119,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.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/26/fpm/Dockerfile b/26/fpm/Dockerfile index bcc80445..13250220 100644 --- a/26/fpm/Dockerfile +++ b/26/fpm/Dockerfile @@ -123,7 +123,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 26.0.9 +ENV NEXTCLOUD_VERSION 26.0.10 RUN set -ex; \ fetchDeps=" \ @@ -133,8 +133,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-26.0.9.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.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/27/apache/Dockerfile b/27/apache/Dockerfile index 192e8633..9671fde0 100644 --- a/27/apache/Dockerfile +++ b/27/apache/Dockerfile @@ -138,7 +138,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 27.1.4 +ENV NEXTCLOUD_VERSION 27.1.5 RUN set -ex; \ fetchDeps=" \ @@ -148,8 +148,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-27.1.4.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.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/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index e3f27315..cfc8a79e 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -111,7 +111,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.4 +ENV NEXTCLOUD_VERSION 27.1.5 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -119,8 +119,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.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/27/fpm/Dockerfile b/27/fpm/Dockerfile index 4f31a70c..4ca64950 100644 --- a/27/fpm/Dockerfile +++ b/27/fpm/Dockerfile @@ -123,7 +123,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.4 +ENV NEXTCLOUD_VERSION 27.1.5 RUN set -ex; \ fetchDeps=" \ @@ -133,8 +133,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-27.1.4.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.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/versions.json b/versions.json index 76074c88..861629b9 100644 --- a/versions.json +++ b/versions.json @@ -27,9 +27,9 @@ }, "27": { "branch": "27", - "version": "27.1.4", - "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.4.tar.bz2.asc", + "version": "27.1.5", + "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -53,9 +53,9 @@ }, "26": { "branch": "26", - "version": "26.0.9", - "url": "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-26.0.9.tar.bz2.asc", + "version": "26.0.10", + "url": "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From 215498b3fe84f209cb09e3fe4cc6d30f87e7ae04 Mon Sep 17 00:00:00 2001 From: J0WI Date: Fri, 15 Dec 2023 23:42:40 +0000 Subject: [PATCH 016/123] Bump to 27.1.5 Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 64ba984e..62c5ce4a 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='27.1.4' +stable_channel='27.1.5' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From b80875632e3f48097ca860d77000f54a96a50acb Mon Sep 17 00:00:00 2001 From: Kaloyan Nikolov Date: Sat, 16 Dec 2023 20:48:47 +0200 Subject: [PATCH 017/123] Update the examples section according to the latest nginx configuration required. (#2123) Signed-off-by: Kaloyan K Nikolov --- .../insecure/mariadb/fpm/web/nginx.conf | 45 +++++++++++++++--- .../insecure/postgres/fpm/web/nginx.conf | 44 +++++++++++++++--- .../mariadb/fpm/web/nginx.conf | 46 ++++++++++++++++--- .../postgres/fpm/web/nginx.conf | 46 ++++++++++++++++--- 4 files changed, 155 insertions(+), 26 deletions(-) diff --git a/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf b/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf index c74ea99b..42e49a1e 100644 --- a/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf +++ b/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf @@ -10,7 +10,7 @@ events { http { - include /etc/nginx/mime.types; + include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' @@ -27,6 +27,12 @@ http { keepalive_timeout 65; + # Set the `immutable` cache control options only for assets with a cache busting `v` argument + map $arg_v $asset_immutable { + "" ""; + default "immutable"; + } + #gzip on; upstream php-handler { @@ -44,17 +50,23 @@ http { # could take several months. #add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always; - # set max upload size + # set max upload size and increase upload timeout: client_max_body_size 512M; + client_body_timeout 300s; fastcgi_buffers 64 4K; + # The settings allows you to optimize the HTTP2 bandwidth. + # See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/ + # for tuning hints + client_body_buffer_size 512k; + # Enable gzip but do not remove ETag headers gzip on; gzip_vary on; gzip_comp_level 4; gzip_min_length 256; gzip_proxied expired no-cache no-store private no_last_modified no_etag auth; - gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; + gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; # Pagespeed is not supported by Nextcloud, so if your server is built # with the `ngx_pagespeed` module, uncomment this line to disable it. @@ -128,7 +140,7 @@ http { # to the URI, resulting in a HTTP 500 error response. location ~ \.php(?:$|/) { # Required for legacy support - rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri; + rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri; fastcgi_split_path_info ^(.+?\.php)(/.*)$; set $path_info $fastcgi_path_info; @@ -146,12 +158,33 @@ http { fastcgi_intercept_errors on; fastcgi_request_buffering off; + + fastcgi_max_temp_file_size 0; } - location ~ \.(?:css|js|svg|gif)$ { + # Javascript mimetype fixes for nginx + # Note: The block below should be removed, and the js|mjs section should be + # added to the block below this one. This is a temporary fix until Nginx + # upstream fixes the js mime-type + location ~* \.(?:js|mjs)$ { + types { + text/javascript js mjs; + } + default_type "text/javascript"; try_files $uri /index.php$request_uri; - expires 6M; # Cache-Control policy borrowed from `.htaccess` + add_header Cache-Control "public, max-age=15778463, $asset_immutable"; + access_log off; + } + + # Serve static files + location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { + try_files $uri /index.php$request_uri; + add_header Cache-Control "public, max-age=15778463, $asset_immutable"; access_log off; # Optional: Don't log access to assets + + location ~ \.wasm$ { + default_type application/wasm; + } } location ~ \.woff2?$ { diff --git a/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf b/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf index c74ea99b..b1c72e5f 100644 --- a/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf +++ b/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf @@ -10,7 +10,7 @@ events { http { - include /etc/nginx/mime.types; + include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' @@ -27,6 +27,12 @@ http { keepalive_timeout 65; + # Set the `immutable` cache control options only for assets with a cache busting `v` argument + map $arg_v $asset_immutable { + "" ""; + default "immutable"; + } + #gzip on; upstream php-handler { @@ -44,17 +50,23 @@ http { # could take several months. #add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always; - # set max upload size + # set max upload size and increase upload timeout: client_max_body_size 512M; + client_body_timeout 300s; fastcgi_buffers 64 4K; + # The settings allows you to optimize the HTTP2 bandwidth. + # See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/ + # for tuning hints + client_body_buffer_size 512k; + # Enable gzip but do not remove ETag headers gzip on; gzip_vary on; gzip_comp_level 4; gzip_min_length 256; gzip_proxied expired no-cache no-store private no_last_modified no_etag auth; - gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; + gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; # Pagespeed is not supported by Nextcloud, so if your server is built # with the `ngx_pagespeed` module, uncomment this line to disable it. @@ -128,7 +140,7 @@ http { # to the URI, resulting in a HTTP 500 error response. location ~ \.php(?:$|/) { # Required for legacy support - rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri; + rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri; fastcgi_split_path_info ^(.+?\.php)(/.*)$; set $path_info $fastcgi_path_info; @@ -146,12 +158,32 @@ http { fastcgi_intercept_errors on; fastcgi_request_buffering off; + + fastcgi_max_temp_file_size 0; } - location ~ \.(?:css|js|svg|gif)$ { + # Javascript mimetype fixes for nginx + # Note: The block below should be removed, and the js|mjs section should be + # added to the block below this one. This is a temporary fix until Nginx + # upstream fixes the js mime-type + location ~* \.(?:js|mjs)$ { + types { + text/javascript js mjs; + } try_files $uri /index.php$request_uri; - expires 6M; # Cache-Control policy borrowed from `.htaccess` + add_header Cache-Control "public, max-age=15778463, $asset_immutable"; + access_log off; + } + + # Serve static files + location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { + try_files $uri /index.php$request_uri; + add_header Cache-Control "public, max-age=15778463, $asset_immutable"; access_log off; # Optional: Don't log access to assets + + location ~ \.wasm$ { + default_type application/wasm; + } } location ~ \.woff2?$ { diff --git a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf index c74ea99b..01c28564 100644 --- a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf +++ b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf @@ -10,7 +10,7 @@ events { http { - include /etc/nginx/mime.types; + include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' @@ -27,6 +27,12 @@ http { keepalive_timeout 65; + # Set the `immutable` cache control options only for assets with a cache busting `v` argument + map $arg_v $asset_immutable { + "" ""; + default "immutable"; + } + #gzip on; upstream php-handler { @@ -44,17 +50,23 @@ http { # could take several months. #add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always; - # set max upload size + # set max upload size and increase upload timeout: client_max_body_size 512M; + client_body_timeout 300s; fastcgi_buffers 64 4K; + # The settings allows you to optimize the HTTP2 bandwidth. + # See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/ + # for tuning hints + client_body_buffer_size 512k; + # Enable gzip but do not remove ETag headers gzip on; gzip_vary on; gzip_comp_level 4; gzip_min_length 256; gzip_proxied expired no-cache no-store private no_last_modified no_etag auth; - gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; + gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; # Pagespeed is not supported by Nextcloud, so if your server is built # with the `ngx_pagespeed` module, uncomment this line to disable it. @@ -128,7 +140,7 @@ http { # to the URI, resulting in a HTTP 500 error response. location ~ \.php(?:$|/) { # Required for legacy support - rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri; + rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri; fastcgi_split_path_info ^(.+?\.php)(/.*)$; set $path_info $fastcgi_path_info; @@ -138,7 +150,7 @@ http { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $path_info; - #fastcgi_param HTTPS on; + fastcgi_param HTTPS on; fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice fastcgi_param front_controller_active true; # Enable pretty urls @@ -146,12 +158,32 @@ http { fastcgi_intercept_errors on; fastcgi_request_buffering off; + + fastcgi_max_temp_file_size 0; } - location ~ \.(?:css|js|svg|gif)$ { + # Javascript mimetype fixes for nginx + # Note: The block below should be removed, and the js|mjs section should be + # added to the block below this one. This is a temporary fix until Nginx + # upstream fixes the js mime-type + location ~* \.(?:js|mjs)$ { + types { + text/javascript js mjs; + } try_files $uri /index.php$request_uri; - expires 6M; # Cache-Control policy borrowed from `.htaccess` + add_header Cache-Control "public, max-age=15778463, $asset_immutable"; + access_log off; + } + + # Serve static files + location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { + try_files $uri /index.php$request_uri; + add_header Cache-Control "public, max-age=15778463, $asset_immutable"; access_log off; # Optional: Don't log access to assets + + location ~ \.wasm$ { + default_type application/wasm; + } } location ~ \.woff2?$ { diff --git a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf index c74ea99b..01c28564 100644 --- a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf +++ b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf @@ -10,7 +10,7 @@ events { http { - include /etc/nginx/mime.types; + include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' @@ -27,6 +27,12 @@ http { keepalive_timeout 65; + # Set the `immutable` cache control options only for assets with a cache busting `v` argument + map $arg_v $asset_immutable { + "" ""; + default "immutable"; + } + #gzip on; upstream php-handler { @@ -44,17 +50,23 @@ http { # could take several months. #add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always; - # set max upload size + # set max upload size and increase upload timeout: client_max_body_size 512M; + client_body_timeout 300s; fastcgi_buffers 64 4K; + # The settings allows you to optimize the HTTP2 bandwidth. + # See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/ + # for tuning hints + client_body_buffer_size 512k; + # Enable gzip but do not remove ETag headers gzip on; gzip_vary on; gzip_comp_level 4; gzip_min_length 256; gzip_proxied expired no-cache no-store private no_last_modified no_etag auth; - gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; + gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; # Pagespeed is not supported by Nextcloud, so if your server is built # with the `ngx_pagespeed` module, uncomment this line to disable it. @@ -128,7 +140,7 @@ http { # to the URI, resulting in a HTTP 500 error response. location ~ \.php(?:$|/) { # Required for legacy support - rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri; + rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri; fastcgi_split_path_info ^(.+?\.php)(/.*)$; set $path_info $fastcgi_path_info; @@ -138,7 +150,7 @@ http { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $path_info; - #fastcgi_param HTTPS on; + fastcgi_param HTTPS on; fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice fastcgi_param front_controller_active true; # Enable pretty urls @@ -146,12 +158,32 @@ http { fastcgi_intercept_errors on; fastcgi_request_buffering off; + + fastcgi_max_temp_file_size 0; } - location ~ \.(?:css|js|svg|gif)$ { + # Javascript mimetype fixes for nginx + # Note: The block below should be removed, and the js|mjs section should be + # added to the block below this one. This is a temporary fix until Nginx + # upstream fixes the js mime-type + location ~* \.(?:js|mjs)$ { + types { + text/javascript js mjs; + } try_files $uri /index.php$request_uri; - expires 6M; # Cache-Control policy borrowed from `.htaccess` + add_header Cache-Control "public, max-age=15778463, $asset_immutable"; + access_log off; + } + + # Serve static files + location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { + try_files $uri /index.php$request_uri; + add_header Cache-Control "public, max-age=15778463, $asset_immutable"; access_log off; # Optional: Don't log access to assets + + location ~ \.wasm$ { + default_type application/wasm; + } } location ~ \.woff2?$ { From 8afd97014cc3445e888a165f8c2d16af7ed036aa Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Thu, 21 Dec 2023 21:31:17 +0000 Subject: [PATCH 018/123] Runs update.sh --- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/fpm/Dockerfile | 6 +++--- latest.txt | 2 +- versions.json | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile index 98a2e546..f74c1a15 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -138,7 +138,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.0 +ENV NEXTCLOUD_VERSION 28.0.1 RUN set -ex; \ fetchDeps=" \ @@ -148,8 +148,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-28.0.0.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index c6a0224c..1133744d 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -111,7 +111,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.0 +ENV NEXTCLOUD_VERSION 28.0.1 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -119,8 +119,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index 3d1c1bb4..a4924ce8 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -123,7 +123,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.0 +ENV NEXTCLOUD_VERSION 28.0.1 RUN set -ex; \ fetchDeps=" \ @@ -133,8 +133,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-28.0.0.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.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 0b4dfcf0..eebc120d 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -28.0.0 +28.0.1 diff --git a/versions.json b/versions.json index 861629b9..b0797107 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "28": { "branch": "28", - "version": "28.0.0", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.0.tar.bz2.asc", + "version": "28.0.1", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From fd6f811978c597d8fc0eb1925fc1d296641ad28e Mon Sep 17 00:00:00 2001 From: Josh Richards Date: Thu, 28 Dec 2023 10:08:35 -0500 Subject: [PATCH 019/123] enh(README) Persistent volume upgrade.exclude clarification - Make the warning more prominent - Clarify the language - Clarity trade-offs Fixes: #2132 Signed-off-by: Josh Richards --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a4592d70..3a85604c 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,8 @@ $ docker run -d \ mariadb:10.6 ``` +### Additional volumes + If you want to get fine grained access to your individual files, you can mount additional volumes for data, config, your theme and custom apps. The `data`, `config` files are stored in respective subfolders inside `/var/www/html/`. The apps are split into core `apps` (which are shipped with Nextcloud and you don't need to take care of) and a `custom_apps` folder. If you use a custom theme it would go into the `themes` subfolder. Overview of the folders that can be mounted as volumes: @@ -91,10 +93,16 @@ $ docker run -d \ -v theme:/var/www/html/themes/ \ nextcloud ``` -If mounting additional volumes, you should note that data inside the main folder (`/var/www/html`) may be removed during installation and upgrades, unless listed in [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude). You should consider: + +### Custom volumes + +If mounting additional volumes under `/var/www/html`, you should consider: - Confirming that [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude) contains the files and folders that should persist during installation and upgrades; or - Mounting storage volumes to locations outside of `/var/www/html`. +> [!WARNING] +> You should note that data inside the main folder (`/var/www/html`) will be removed during installation and upgrades, unless listed in [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude). The additional volumes officially supported are already in that list, but custom volumes will need to be added by you. We suggest mounting custom storage volumes outside of `/var/www/html` so that making this adjustment is unnecessary. If you must do so, however, you may build a custom image with a modified `/upgrade.exclude` file that incorporates your custom volume(s). + ## Using the Nextcloud command-line interface To use the [Nextcloud command-line interface](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html) (aka. `occ` command): From d89def24d197f86bbd3c0e209dd4627e96740c53 Mon Sep 17 00:00:00 2001 From: Yevhen Kolomeiko Date: Wed, 10 Jan 2024 00:31:39 +0200 Subject: [PATCH 020/123] Fix for PR #2095 breaking post-installation scripts in k8s (#2115) * Fix docker-entrypoint.sh Signed-off-by: Yevhen Kolomeiko * Fix docker-entrypoint.sh for alpine Signed-off-by: Yevhen Kolomeiko * Use '-o' instead of two find's in docker-entrypoint.sh Signed-off-by: Yevhen Kolomeiko * Use more laconic find parameters set in docker-entrypoint.sh Signed-off-by: Yevhen Kolomeiko --------- Signed-off-by: Yevhen Kolomeiko --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index edb539a0..5b627f07 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue From 28a76ceba469acb1267e35d8e6c9bd389ef9d186 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Tue, 9 Jan 2024 22:31:54 +0000 Subject: [PATCH 021/123] Runs update.sh --- 26/apache/entrypoint.sh | 2 +- 26/fpm-alpine/entrypoint.sh | 2 +- 26/fpm/entrypoint.sh | 2 +- 27/apache/entrypoint.sh | 2 +- 27/fpm-alpine/entrypoint.sh | 2 +- 27/fpm/entrypoint.sh | 2 +- 28/apache/entrypoint.sh | 2 +- 28/fpm-alpine/entrypoint.sh | 2 +- 28/fpm/entrypoint.sh | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/26/apache/entrypoint.sh b/26/apache/entrypoint.sh index edb539a0..5b627f07 100755 --- a/26/apache/entrypoint.sh +++ b/26/apache/entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue diff --git a/26/fpm-alpine/entrypoint.sh b/26/fpm-alpine/entrypoint.sh index edb539a0..5b627f07 100755 --- a/26/fpm-alpine/entrypoint.sh +++ b/26/fpm-alpine/entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue diff --git a/26/fpm/entrypoint.sh b/26/fpm/entrypoint.sh index edb539a0..5b627f07 100755 --- a/26/fpm/entrypoint.sh +++ b/26/fpm/entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue diff --git a/27/apache/entrypoint.sh b/27/apache/entrypoint.sh index edb539a0..5b627f07 100755 --- a/27/apache/entrypoint.sh +++ b/27/apache/entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue diff --git a/27/fpm-alpine/entrypoint.sh b/27/fpm-alpine/entrypoint.sh index edb539a0..5b627f07 100755 --- a/27/fpm-alpine/entrypoint.sh +++ b/27/fpm-alpine/entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue diff --git a/27/fpm/entrypoint.sh b/27/fpm/entrypoint.sh index edb539a0..5b627f07 100755 --- a/27/fpm/entrypoint.sh +++ b/27/fpm/entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue diff --git a/28/apache/entrypoint.sh b/28/apache/entrypoint.sh index edb539a0..5b627f07 100755 --- a/28/apache/entrypoint.sh +++ b/28/apache/entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue diff --git a/28/fpm-alpine/entrypoint.sh b/28/fpm-alpine/entrypoint.sh index edb539a0..5b627f07 100755 --- a/28/fpm-alpine/entrypoint.sh +++ b/28/fpm-alpine/entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue diff --git a/28/fpm/entrypoint.sh b/28/fpm/entrypoint.sh index edb539a0..5b627f07 100755 --- a/28/fpm/entrypoint.sh +++ b/28/fpm/entrypoint.sh @@ -32,7 +32,7 @@ run_path() { echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" ( - find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read -r script_file_path; do + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do if ! [ -x "${script_file_path}" ]; then echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" continue From 071b888f7f689caa62c1498b6c61cb3599bcea2b Mon Sep 17 00:00:00 2001 From: J0WI Date: Tue, 9 Jan 2024 23:04:18 +0000 Subject: [PATCH 022/123] Update logo (#2143) --- logo.svg | 110 +------------------------------------------------------ 1 file changed, 1 insertion(+), 109 deletions(-) diff --git a/logo.svg b/logo.svg index 80d546e7..7d4003de 100644 --- a/logo.svg +++ b/logo.svg @@ -1,109 +1 @@ - - - -image/svg+xml \ No newline at end of file + \ No newline at end of file From bbc81a94b7b89b044ccaed7c535e5bd3ec17ef55 Mon Sep 17 00:00:00 2001 From: J0WI Date: Tue, 9 Jan 2024 23:12:44 +0000 Subject: [PATCH 023/123] Update logo in README.md Signed-off-by: J0WI --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a4592d70..f82aae2d 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ A safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms. -![logo](https://cdn.rawgit.com/nextcloud/docker/80dd587d847b184ba95d7187a2a7a56ae4cbbb7b/logo.svg) +![logo](https://cdn.rawgit.com/nextcloud/docker/071b888f7f689caa62c1498b6c61cb3599bcea2b/logo.svg) This Docker micro-service image is developed and maintained by the Nextcloud community. Nextcloud GmbH does not offer support for this Docker image. When you are looking to get professional support, you can become an [enterprise](https://nextcloud.com/enterprise/) customer or use [Nextcloud All-in-One docker image](https://github.com/nextcloud/all-in-one#nextcloud-all-in-one) - as the name suggests, Nextcloud All-in-One provides easy deployment and maintenance of Nextcloud Hub included in this one Nextcloud instance. From accf5bf119b39b1a38d073e9e13e83b119c06e81 Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 12 Jan 2024 15:12:03 -0500 Subject: [PATCH 024/123] Update README.md Co-authored-by: J0WI Signed-off-by: Josh --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a85604c..2bb6de38 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ If mounting additional volumes under `/var/www/html`, you should consider: - Mounting storage volumes to locations outside of `/var/www/html`. > [!WARNING] -> You should note that data inside the main folder (`/var/www/html`) will be removed during installation and upgrades, unless listed in [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude). The additional volumes officially supported are already in that list, but custom volumes will need to be added by you. We suggest mounting custom storage volumes outside of `/var/www/html` so that making this adjustment is unnecessary. If you must do so, however, you may build a custom image with a modified `/upgrade.exclude` file that incorporates your custom volume(s). +> You should note that data inside the main folder (`/var/www/html`) will be overridden/removed during installation and upgrades, unless listed in [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude). The additional volumes officially supported are already in that list, but custom volumes will need to be added by you. We suggest mounting custom storage volumes outside of `/var/www/html` and if possible read-only so that making this adjustment is unnecessary. If you must do so, however, you may build a custom image with a modified `/upgrade.exclude` file that incorporates your custom volume(s). ## Using the Nextcloud command-line interface From f14ad96e2d5d970d20a9ccdc793d066e5f47bcfb Mon Sep 17 00:00:00 2001 From: Raphael Nestler Date: Sun, 14 Jan 2024 02:12:38 +0100 Subject: [PATCH 025/123] Mention minimal SMTP configuration in README.md (#2144) Looking at https://github.com/nextcloud/docker/blob/d1dbc77e0b5e851105cf8606942e74b7d21fe682/.config/smtp.config.php it is clear that `SMTP_HOST`, `MAIL_FROM_ADDRESS` and `MAIL_DOMAIN` must be set. Signed-off-by: Raphael Nestler --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9cbcfbe4..c759ecba 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,8 @@ To use an external SMTP server, you have to provide the connection details. To c - `MAIL_FROM_ADDRESS` (not set by default): Set the local-part for the 'from' field in the emails sent by Nextcloud. - `MAIL_DOMAIN` (not set by default): Set a different domain for the emails than the domain where Nextcloud is installed. +At least `SMTP_HOST`, `MAIL_FROM_ADDRESS` and `MAIL_DOMAIN` must be set for the configurations to be applied. + Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/email_configuration.html) for other values to configure SMTP. To use an external S3 compatible object store as primary storage, set the following variables: From 5dfa556afcd8d993640cc0f75bc6a25d4eb8e534 Mon Sep 17 00:00:00 2001 From: Patrick Hobusch Date: Tue, 16 Jan 2024 07:04:05 +0700 Subject: [PATCH 026/123] Allow setting AWS S3 storage class (#2138) The AWS S3 storage class can now be set using the environment variable `OBJECTSTORE_S3_STORAGE_CLASS`. The order of the AWS S3 environment variables in the `README.md` has also been adjusted to be more "logical". Signed-off-by: Patrick Hobusch --- .config/s3.config.php | 3 ++- README.md | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.config/s3.config.php b/.config/s3.config.php index 6d0ede91..38040ded 100644 --- a/.config/s3.config.php +++ b/.config/s3.config.php @@ -12,6 +12,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, @@ -38,4 +39,4 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } -} +} diff --git a/README.md b/README.md index c759ecba..e51a8b3b 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ nextcloud ### Custom volumes If mounting additional volumes under `/var/www/html`, you should consider: -- Confirming that [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude) contains the files and folders that should persist during installation and upgrades; or +- Confirming that [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude) contains the files and folders that should persist during installation and upgrades; or - Mounting storage volumes to locations outside of `/var/www/html`. > [!WARNING] @@ -179,13 +179,14 @@ At least `SMTP_HOST`, `MAIL_FROM_ADDRESS` and `MAIL_DOMAIN` must be set for the Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/email_configuration.html) for other values to configure SMTP. To use an external S3 compatible object store as primary storage, set the following variables: -- `OBJECTSTORE_S3_HOST`: The hostname of the object storage server - `OBJECTSTORE_S3_BUCKET`: The name of the bucket that Nextcloud should store the data in +- `OBJECTSTORE_S3_REGION`: The region that the S3 bucket resides in +- `OBJECTSTORE_S3_HOST`: The hostname of the object storage server +- `OBJECTSTORE_S3_PORT`: The port that the object storage server is being served over - `OBJECTSTORE_S3_KEY`: AWS style access key - `OBJECTSTORE_S3_SECRET`: AWS style secret access key -- `OBJECTSTORE_S3_PORT`: The port that the object storage server is being served over +- `OBJECTSTORE_S3_STORAGE_CLASS`: The storage class to use when adding objects to the bucket - `OBJECTSTORE_S3_SSL` (default: `true`): Whether or not SSL/TLS should be used to communicate with object storage server -- `OBJECTSTORE_S3_REGION`: The region that the S3 bucket resides in. - `OBJECTSTORE_S3_USEPATH_STYLE` (default: `false`): Not required for AWS S3 - `OBJECTSTORE_S3_LEGACYAUTH` (default: `false`): Not required for AWS S3 - `OBJECTSTORE_S3_OBJECT_PREFIX` (default: `urn:oid:`): Prefix to prepend to the fileid @@ -212,7 +213,7 @@ To customize other PHP limits you can simply change the following variables: - `PHP_UPLOAD_LIMIT` (default `512M`) This sets the upload limit (`post_max_size` and `upload_max_filesize`) for big files. Note that you may have to change other limits depending on your client, webserver or operating system. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html) for more information. To customize Apache max file upload limit you can change the following variable: -- `APACHE_BODY_LIMIT` (default `1073741824` [1GiB]) This restricts the total +- `APACHE_BODY_LIMIT` (default `1073741824` [1GiB]) This restricts the total size of the HTTP request body sent from the client. It specifies the number of _bytes_ that are allowed in a request body. A value of **0** means **unlimited**. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html#apache) for more information. From 39a72a4106e9f8f309de37ec67ab7d195b8a05cf Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Tue, 16 Jan 2024 00:04:19 +0000 Subject: [PATCH 027/123] Runs update.sh --- 26/apache/config/s3.config.php | 3 ++- 26/fpm-alpine/config/s3.config.php | 3 ++- 26/fpm/config/s3.config.php | 3 ++- 27/apache/config/s3.config.php | 3 ++- 27/fpm-alpine/config/s3.config.php | 3 ++- 27/fpm/config/s3.config.php | 3 ++- 28/apache/config/s3.config.php | 3 ++- 28/fpm-alpine/config/s3.config.php | 3 ++- 28/fpm/config/s3.config.php | 3 ++- 9 files changed, 18 insertions(+), 9 deletions(-) diff --git a/26/apache/config/s3.config.php b/26/apache/config/s3.config.php index 6d0ede91..38040ded 100644 --- a/26/apache/config/s3.config.php +++ b/26/apache/config/s3.config.php @@ -12,6 +12,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, @@ -38,4 +39,4 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } -} +} diff --git a/26/fpm-alpine/config/s3.config.php b/26/fpm-alpine/config/s3.config.php index 6d0ede91..38040ded 100644 --- a/26/fpm-alpine/config/s3.config.php +++ b/26/fpm-alpine/config/s3.config.php @@ -12,6 +12,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, @@ -38,4 +39,4 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } -} +} diff --git a/26/fpm/config/s3.config.php b/26/fpm/config/s3.config.php index 6d0ede91..38040ded 100644 --- a/26/fpm/config/s3.config.php +++ b/26/fpm/config/s3.config.php @@ -12,6 +12,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, @@ -38,4 +39,4 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } -} +} diff --git a/27/apache/config/s3.config.php b/27/apache/config/s3.config.php index 6d0ede91..38040ded 100644 --- a/27/apache/config/s3.config.php +++ b/27/apache/config/s3.config.php @@ -12,6 +12,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, @@ -38,4 +39,4 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } -} +} diff --git a/27/fpm-alpine/config/s3.config.php b/27/fpm-alpine/config/s3.config.php index 6d0ede91..38040ded 100644 --- a/27/fpm-alpine/config/s3.config.php +++ b/27/fpm-alpine/config/s3.config.php @@ -12,6 +12,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, @@ -38,4 +39,4 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } -} +} diff --git a/27/fpm/config/s3.config.php b/27/fpm/config/s3.config.php index 6d0ede91..38040ded 100644 --- a/27/fpm/config/s3.config.php +++ b/27/fpm/config/s3.config.php @@ -12,6 +12,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, @@ -38,4 +39,4 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } -} +} diff --git a/28/apache/config/s3.config.php b/28/apache/config/s3.config.php index 6d0ede91..38040ded 100644 --- a/28/apache/config/s3.config.php +++ b/28/apache/config/s3.config.php @@ -12,6 +12,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, @@ -38,4 +39,4 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } -} +} diff --git a/28/fpm-alpine/config/s3.config.php b/28/fpm-alpine/config/s3.config.php index 6d0ede91..38040ded 100644 --- a/28/fpm-alpine/config/s3.config.php +++ b/28/fpm-alpine/config/s3.config.php @@ -12,6 +12,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, @@ -38,4 +39,4 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } -} +} diff --git a/28/fpm/config/s3.config.php b/28/fpm/config/s3.config.php index 6d0ede91..38040ded 100644 --- a/28/fpm/config/s3.config.php +++ b/28/fpm/config/s3.config.php @@ -12,6 +12,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, @@ -38,4 +39,4 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } -} +} From 75ae60a43a9f0d3dd61e3410e68b7186365652e9 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Thu, 25 Jan 2024 13:59:48 +0000 Subject: [PATCH 028/123] Runs update.sh --- 26/apache/Dockerfile | 6 +++--- 26/fpm-alpine/Dockerfile | 6 +++--- 26/fpm/Dockerfile | 6 +++--- 27/apache/Dockerfile | 6 +++--- 27/fpm-alpine/Dockerfile | 6 +++--- 27/fpm/Dockerfile | 6 +++--- versions.json | 12 ++++++------ 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/26/apache/Dockerfile b/26/apache/Dockerfile index cc287529..14679605 100644 --- a/26/apache/Dockerfile +++ b/26/apache/Dockerfile @@ -138,7 +138,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 26.0.10 +ENV NEXTCLOUD_VERSION 26.0.11 RUN set -ex; \ fetchDeps=" \ @@ -148,8 +148,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-26.0.10.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.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/26/fpm-alpine/Dockerfile b/26/fpm-alpine/Dockerfile index dce75c8b..6034a7a2 100644 --- a/26/fpm-alpine/Dockerfile +++ b/26/fpm-alpine/Dockerfile @@ -111,7 +111,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 26.0.10 +ENV NEXTCLOUD_VERSION 26.0.11 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -119,8 +119,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.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/26/fpm/Dockerfile b/26/fpm/Dockerfile index 13250220..a84adfd2 100644 --- a/26/fpm/Dockerfile +++ b/26/fpm/Dockerfile @@ -123,7 +123,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 26.0.10 +ENV NEXTCLOUD_VERSION 26.0.11 RUN set -ex; \ fetchDeps=" \ @@ -133,8 +133,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-26.0.10.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.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/27/apache/Dockerfile b/27/apache/Dockerfile index 9671fde0..14bd5752 100644 --- a/27/apache/Dockerfile +++ b/27/apache/Dockerfile @@ -138,7 +138,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 27.1.5 +ENV NEXTCLOUD_VERSION 27.1.6 RUN set -ex; \ fetchDeps=" \ @@ -148,8 +148,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-27.1.5.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.6.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.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/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index cfc8a79e..c6bd258f 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -111,7 +111,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.5 +ENV NEXTCLOUD_VERSION 27.1.6 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -119,8 +119,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.6.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.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/27/fpm/Dockerfile b/27/fpm/Dockerfile index 4ca64950..7f6d0b43 100644 --- a/27/fpm/Dockerfile +++ b/27/fpm/Dockerfile @@ -123,7 +123,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.5 +ENV NEXTCLOUD_VERSION 27.1.6 RUN set -ex; \ fetchDeps=" \ @@ -133,8 +133,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-27.1.5.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.6.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.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/versions.json b/versions.json index b0797107..855f9932 100644 --- a/versions.json +++ b/versions.json @@ -27,9 +27,9 @@ }, "27": { "branch": "27", - "version": "27.1.5", - "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.5.tar.bz2.asc", + "version": "27.1.6", + "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.6.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.6.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -53,9 +53,9 @@ }, "26": { "branch": "26", - "version": "26.0.10", - "url": "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-26.0.10.tar.bz2.asc", + "version": "26.0.11", + "url": "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From 72fad312b37095a4141590beef17010fc131c693 Mon Sep 17 00:00:00 2001 From: J0WI Date: Thu, 25 Jan 2024 23:08:23 +0000 Subject: [PATCH 029/123] Bump to 27.1.6 Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 62c5ce4a..9bbea92e 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='27.1.5' +stable_channel='27.1.6' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From c88d31e3b8fb6733779d1a728c631f612171d06f Mon Sep 17 00:00:00 2001 From: J0WI Date: Thu, 25 Jan 2024 23:50:34 +0000 Subject: [PATCH 030/123] Alpine 3.19 (#2150) Signed-off-by: J0WI --- 26/fpm-alpine/Dockerfile | 2 +- 27/fpm-alpine/Dockerfile | 2 +- 28/fpm-alpine/Dockerfile | 2 +- update.sh | 2 +- versions.json | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/26/fpm-alpine/Dockerfile b/26/fpm-alpine/Dockerfile index 6034a7a2..165496d1 100644 --- a/26/fpm-alpine/Dockerfile +++ b/26/fpm-alpine/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT: created by update.sh from Dockerfile-alpine.template -FROM php:8.2-fpm-alpine3.18 +FROM php:8.2-fpm-alpine3.19 # entrypoint.sh and cron.sh dependencies RUN set -ex; \ diff --git a/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index c6bd258f..14546557 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT: created by update.sh from Dockerfile-alpine.template -FROM php:8.2-fpm-alpine3.18 +FROM php:8.2-fpm-alpine3.19 # entrypoint.sh and cron.sh dependencies RUN set -ex; \ diff --git a/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 1133744d..461b6b35 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.18 +FROM php:8.2-fpm-alpine3.19 # entrypoint.sh and cron.sh dependencies RUN set -ex; \ diff --git a/update.sh b/update.sh index 9556d8ce..bea95729 100755 --- a/update.sh +++ b/update.sh @@ -2,7 +2,7 @@ set -eo pipefail declare -A alpine_version=( - [default]='3.18' + [default]='3.19' ) declare -A debian_version=( diff --git a/versions.json b/versions.json index 855f9932..4b973639 100644 --- a/versions.json +++ b/versions.json @@ -20,7 +20,7 @@ "fpm-alpine": { "variant": "fpm-alpine", "base": "alpine", - "baseVersion": "3.18", + "baseVersion": "3.19", "phpVersion": "8.2" } } @@ -46,7 +46,7 @@ "fpm-alpine": { "variant": "fpm-alpine", "base": "alpine", - "baseVersion": "3.18", + "baseVersion": "3.19", "phpVersion": "8.2" } } @@ -72,7 +72,7 @@ "fpm-alpine": { "variant": "fpm-alpine", "base": "alpine", - "baseVersion": "3.18", + "baseVersion": "3.19", "phpVersion": "8.2" } } From 2e9139bac8d18a70c525398f445677110126d029 Mon Sep 17 00:00:00 2001 From: Patrick Hobusch Date: Fri, 26 Jan 2024 08:24:41 +0800 Subject: [PATCH 031/123] Allow setting AWS S3 SSE-C key (#2151) The AWS S3 SSE-C key for server side encryption can now be set using the environment variable `OBJECTSTORE_S3_SSE_C_KEY`. Signed-off-by: Patrick Hobusch --- .config/s3.config.php | 6 ++++++ README.md | 1 + 2 files changed, 7 insertions(+) diff --git a/.config/s3.config.php b/.config/s3.config.php index 38040ded..374cba2d 100644 --- a/.config/s3.config.php +++ b/.config/s3.config.php @@ -39,4 +39,10 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } } diff --git a/README.md b/README.md index e51a8b3b..6f313954 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,7 @@ To use an external S3 compatible object store as primary storage, set the follow - `OBJECTSTORE_S3_LEGACYAUTH` (default: `false`): Not required for AWS S3 - `OBJECTSTORE_S3_OBJECT_PREFIX` (default: `urn:oid:`): Prefix to prepend to the fileid - `OBJECTSTORE_S3_AUTOCREATE` (default: `true`): Create the container if it does not exist +- `OBJECTSTORE_S3_SSE_C_KEY` (not set by default): Base64 encoded key with a maximum length of 32 bytes for server side encryption (SSE-C) Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html#simple-storage-service-s3) for more information. From 59dd41aaca14d3cd3ddbf072973c1b8a7bc14cc8 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Fri, 26 Jan 2024 00:25:01 +0000 Subject: [PATCH 032/123] Runs update.sh --- 26/apache/config/s3.config.php | 6 ++++++ 26/fpm-alpine/config/s3.config.php | 6 ++++++ 26/fpm/config/s3.config.php | 6 ++++++ 27/apache/config/s3.config.php | 6 ++++++ 27/fpm-alpine/config/s3.config.php | 6 ++++++ 27/fpm/config/s3.config.php | 6 ++++++ 28/apache/config/s3.config.php | 6 ++++++ 28/fpm-alpine/config/s3.config.php | 6 ++++++ 28/fpm/config/s3.config.php | 6 ++++++ 9 files changed, 54 insertions(+) diff --git a/26/apache/config/s3.config.php b/26/apache/config/s3.config.php index 38040ded..374cba2d 100644 --- a/26/apache/config/s3.config.php +++ b/26/apache/config/s3.config.php @@ -39,4 +39,10 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } } diff --git a/26/fpm-alpine/config/s3.config.php b/26/fpm-alpine/config/s3.config.php index 38040ded..374cba2d 100644 --- a/26/fpm-alpine/config/s3.config.php +++ b/26/fpm-alpine/config/s3.config.php @@ -39,4 +39,10 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } } diff --git a/26/fpm/config/s3.config.php b/26/fpm/config/s3.config.php index 38040ded..374cba2d 100644 --- a/26/fpm/config/s3.config.php +++ b/26/fpm/config/s3.config.php @@ -39,4 +39,10 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } } diff --git a/27/apache/config/s3.config.php b/27/apache/config/s3.config.php index 38040ded..374cba2d 100644 --- a/27/apache/config/s3.config.php +++ b/27/apache/config/s3.config.php @@ -39,4 +39,10 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } } diff --git a/27/fpm-alpine/config/s3.config.php b/27/fpm-alpine/config/s3.config.php index 38040ded..374cba2d 100644 --- a/27/fpm-alpine/config/s3.config.php +++ b/27/fpm-alpine/config/s3.config.php @@ -39,4 +39,10 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } } diff --git a/27/fpm/config/s3.config.php b/27/fpm/config/s3.config.php index 38040ded..374cba2d 100644 --- a/27/fpm/config/s3.config.php +++ b/27/fpm/config/s3.config.php @@ -39,4 +39,10 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } } diff --git a/28/apache/config/s3.config.php b/28/apache/config/s3.config.php index 38040ded..374cba2d 100644 --- a/28/apache/config/s3.config.php +++ b/28/apache/config/s3.config.php @@ -39,4 +39,10 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } } diff --git a/28/fpm-alpine/config/s3.config.php b/28/fpm-alpine/config/s3.config.php index 38040ded..374cba2d 100644 --- a/28/fpm-alpine/config/s3.config.php +++ b/28/fpm-alpine/config/s3.config.php @@ -39,4 +39,10 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } } diff --git a/28/fpm/config/s3.config.php b/28/fpm/config/s3.config.php index 38040ded..374cba2d 100644 --- a/28/fpm/config/s3.config.php +++ b/28/fpm/config/s3.config.php @@ -39,4 +39,10 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { } else { $CONFIG['objectstore']['arguments']['secret'] = ''; } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } } From 5aa43c00c808791cdd1504998e8cc88365140a60 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Thu, 1 Feb 2024 20:46:19 +0000 Subject: [PATCH 033/123] Runs update.sh --- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/fpm/Dockerfile | 6 +++--- latest.txt | 2 +- versions.json | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile index f74c1a15..91027aac 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -138,7 +138,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.1 +ENV NEXTCLOUD_VERSION 28.0.2 RUN set -ex; \ fetchDeps=" \ @@ -148,8 +148,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-28.0.1.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 461b6b35..c1963efc 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -111,7 +111,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.1 +ENV NEXTCLOUD_VERSION 28.0.2 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -119,8 +119,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index a4924ce8..e43457d9 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -123,7 +123,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.1 +ENV NEXTCLOUD_VERSION 28.0.2 RUN set -ex; \ fetchDeps=" \ @@ -133,8 +133,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-28.0.1.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.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 eebc120d..d2f7b9d3 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -28.0.1 +28.0.2 diff --git a/versions.json b/versions.json index 4b973639..6cbedba9 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "28": { "branch": "28", - "version": "28.0.1", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.1.tar.bz2.asc", + "version": "28.0.2", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From e869267b20d9693e655e0eba2485d4dcbdeeaab7 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 5 Feb 2024 11:52:18 +0100 Subject: [PATCH 034/123] update docker-entrypoint.sh Signed-off-by: Simon L --- docker-entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 5b627f07..53f96466 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -276,4 +276,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi +echo "⚠️⚠️⚠️" +echo "This image is maintained by community volunteers and designed for expert use." +echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." +echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" +echo "⚠️⚠️⚠️ " + exec "$@" From e0ed07cfbfe58a272ad64b94bdfc4e9eb2305f4e Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Mon, 5 Feb 2024 12:08:20 +0000 Subject: [PATCH 035/123] Runs update.sh --- 26/apache/entrypoint.sh | 6 ++++++ 26/fpm-alpine/entrypoint.sh | 6 ++++++ 26/fpm/entrypoint.sh | 6 ++++++ 27/apache/entrypoint.sh | 6 ++++++ 27/fpm-alpine/entrypoint.sh | 6 ++++++ 27/fpm/entrypoint.sh | 6 ++++++ 28/apache/entrypoint.sh | 6 ++++++ 28/fpm-alpine/entrypoint.sh | 6 ++++++ 28/fpm/entrypoint.sh | 6 ++++++ 9 files changed, 54 insertions(+) diff --git a/26/apache/entrypoint.sh b/26/apache/entrypoint.sh index 5b627f07..53f96466 100755 --- a/26/apache/entrypoint.sh +++ b/26/apache/entrypoint.sh @@ -276,4 +276,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi +echo "⚠️⚠️⚠️" +echo "This image is maintained by community volunteers and designed for expert use." +echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." +echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" +echo "⚠️⚠️⚠️ " + exec "$@" diff --git a/26/fpm-alpine/entrypoint.sh b/26/fpm-alpine/entrypoint.sh index 5b627f07..53f96466 100755 --- a/26/fpm-alpine/entrypoint.sh +++ b/26/fpm-alpine/entrypoint.sh @@ -276,4 +276,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi +echo "⚠️⚠️⚠️" +echo "This image is maintained by community volunteers and designed for expert use." +echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." +echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" +echo "⚠️⚠️⚠️ " + exec "$@" diff --git a/26/fpm/entrypoint.sh b/26/fpm/entrypoint.sh index 5b627f07..53f96466 100755 --- a/26/fpm/entrypoint.sh +++ b/26/fpm/entrypoint.sh @@ -276,4 +276,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi +echo "⚠️⚠️⚠️" +echo "This image is maintained by community volunteers and designed for expert use." +echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." +echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" +echo "⚠️⚠️⚠️ " + exec "$@" diff --git a/27/apache/entrypoint.sh b/27/apache/entrypoint.sh index 5b627f07..53f96466 100755 --- a/27/apache/entrypoint.sh +++ b/27/apache/entrypoint.sh @@ -276,4 +276,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi +echo "⚠️⚠️⚠️" +echo "This image is maintained by community volunteers and designed for expert use." +echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." +echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" +echo "⚠️⚠️⚠️ " + exec "$@" diff --git a/27/fpm-alpine/entrypoint.sh b/27/fpm-alpine/entrypoint.sh index 5b627f07..53f96466 100755 --- a/27/fpm-alpine/entrypoint.sh +++ b/27/fpm-alpine/entrypoint.sh @@ -276,4 +276,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi +echo "⚠️⚠️⚠️" +echo "This image is maintained by community volunteers and designed for expert use." +echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." +echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" +echo "⚠️⚠️⚠️ " + exec "$@" diff --git a/27/fpm/entrypoint.sh b/27/fpm/entrypoint.sh index 5b627f07..53f96466 100755 --- a/27/fpm/entrypoint.sh +++ b/27/fpm/entrypoint.sh @@ -276,4 +276,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi +echo "⚠️⚠️⚠️" +echo "This image is maintained by community volunteers and designed for expert use." +echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." +echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" +echo "⚠️⚠️⚠️ " + exec "$@" diff --git a/28/apache/entrypoint.sh b/28/apache/entrypoint.sh index 5b627f07..53f96466 100755 --- a/28/apache/entrypoint.sh +++ b/28/apache/entrypoint.sh @@ -276,4 +276,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi +echo "⚠️⚠️⚠️" +echo "This image is maintained by community volunteers and designed for expert use." +echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." +echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" +echo "⚠️⚠️⚠️ " + exec "$@" diff --git a/28/fpm-alpine/entrypoint.sh b/28/fpm-alpine/entrypoint.sh index 5b627f07..53f96466 100755 --- a/28/fpm-alpine/entrypoint.sh +++ b/28/fpm-alpine/entrypoint.sh @@ -276,4 +276,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi +echo "⚠️⚠️⚠️" +echo "This image is maintained by community volunteers and designed for expert use." +echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." +echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" +echo "⚠️⚠️⚠️ " + exec "$@" diff --git a/28/fpm/entrypoint.sh b/28/fpm/entrypoint.sh index 5b627f07..53f96466 100755 --- a/28/fpm/entrypoint.sh +++ b/28/fpm/entrypoint.sh @@ -276,4 +276,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi +echo "⚠️⚠️⚠️" +echo "This image is maintained by community volunteers and designed for expert use." +echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." +echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" +echo "⚠️⚠️⚠️ " + exec "$@" From be444a05a24a50f1c786446d432e00635c26270b Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 5 Feb 2024 14:32:42 +0100 Subject: [PATCH 036/123] Update Readme.md Signed-off-by: Simon L --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f313954..b02c66de 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ A safe home for all your data. Access & share your files, calendars, contacts, m ![logo](https://cdn.rawgit.com/nextcloud/docker/071b888f7f689caa62c1498b6c61cb3599bcea2b/logo.svg) -This Docker micro-service image is developed and maintained by the Nextcloud community. Nextcloud GmbH does not offer support for this Docker image. When you are looking to get professional support, you can become an [enterprise](https://nextcloud.com/enterprise/) customer or use [Nextcloud All-in-One docker image](https://github.com/nextcloud/all-in-one#nextcloud-all-in-one) - as the name suggests, Nextcloud All-in-One provides easy deployment and maintenance of Nextcloud Hub included in this one Nextcloud instance. +⚠️⚠️⚠️ This image is maintained by community volunteers and designed for expert use. For quick and easy deployment that supports the full set of Nextcloud Hub features, use the [Nextcloud All-in-One docker container](https://github.com/nextcloud/all-in-one#nextcloud-all-in-one) maintained by Nextcloud GmbH. # How to use this image This image is designed to be used in a micro-service environment. There are two versions of the image you can choose from. From 6701f64a003911eb107bc7ff0ee6e6ff61343d73 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Fri, 1 Mar 2024 00:28:03 +0000 Subject: [PATCH 037/123] Runs update.sh --- 26/apache/Dockerfile | 6 +++--- 26/fpm-alpine/Dockerfile | 6 +++--- 26/fpm/Dockerfile | 6 +++--- 27/apache/Dockerfile | 6 +++--- 27/fpm-alpine/Dockerfile | 6 +++--- 27/fpm/Dockerfile | 6 +++--- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/fpm/Dockerfile | 6 +++--- latest.txt | 2 +- versions.json | 18 +++++++++--------- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/26/apache/Dockerfile b/26/apache/Dockerfile index 14679605..7c59ef34 100644 --- a/26/apache/Dockerfile +++ b/26/apache/Dockerfile @@ -138,7 +138,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 26.0.11 +ENV NEXTCLOUD_VERSION 26.0.12 RUN set -ex; \ fetchDeps=" \ @@ -148,8 +148,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-26.0.11.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.12.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.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/26/fpm-alpine/Dockerfile b/26/fpm-alpine/Dockerfile index 165496d1..be623342 100644 --- a/26/fpm-alpine/Dockerfile +++ b/26/fpm-alpine/Dockerfile @@ -111,7 +111,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 26.0.11 +ENV NEXTCLOUD_VERSION 26.0.12 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -119,8 +119,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.12.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.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/26/fpm/Dockerfile b/26/fpm/Dockerfile index a84adfd2..610034d3 100644 --- a/26/fpm/Dockerfile +++ b/26/fpm/Dockerfile @@ -123,7 +123,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 26.0.11 +ENV NEXTCLOUD_VERSION 26.0.12 RUN set -ex; \ fetchDeps=" \ @@ -133,8 +133,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-26.0.11.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.12.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.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/27/apache/Dockerfile b/27/apache/Dockerfile index 14bd5752..64e94040 100644 --- a/27/apache/Dockerfile +++ b/27/apache/Dockerfile @@ -138,7 +138,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 27.1.6 +ENV NEXTCLOUD_VERSION 27.1.7 RUN set -ex; \ fetchDeps=" \ @@ -148,8 +148,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-27.1.6.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.6.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.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/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index 14546557..20736951 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -111,7 +111,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.6 +ENV NEXTCLOUD_VERSION 27.1.7 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -119,8 +119,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.6.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.6.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.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/27/fpm/Dockerfile b/27/fpm/Dockerfile index 7f6d0b43..482eef19 100644 --- a/27/fpm/Dockerfile +++ b/27/fpm/Dockerfile @@ -123,7 +123,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.6 +ENV NEXTCLOUD_VERSION 27.1.7 RUN set -ex; \ fetchDeps=" \ @@ -133,8 +133,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-27.1.6.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.6.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.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/28/apache/Dockerfile b/28/apache/Dockerfile index 91027aac..364ab384 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -138,7 +138,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.2 +ENV NEXTCLOUD_VERSION 28.0.3 RUN set -ex; \ fetchDeps=" \ @@ -148,8 +148,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-28.0.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index c1963efc..7567896a 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -111,7 +111,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.2 +ENV NEXTCLOUD_VERSION 28.0.3 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -119,8 +119,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index e43457d9..f8629906 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -123,7 +123,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.2 +ENV NEXTCLOUD_VERSION 28.0.3 RUN set -ex; \ fetchDeps=" \ @@ -133,8 +133,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-28.0.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.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 d2f7b9d3..e4d87fa9 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -28.0.2 +28.0.3 diff --git a/versions.json b/versions.json index 6cbedba9..d71d84cf 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "28": { "branch": "28", - "version": "28.0.2", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.2.tar.bz2.asc", + "version": "28.0.3", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -27,9 +27,9 @@ }, "27": { "branch": "27", - "version": "27.1.6", - "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.6.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.6.tar.bz2.asc", + "version": "27.1.7", + "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -53,9 +53,9 @@ }, "26": { "branch": "26", - "version": "26.0.11", - "url": "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-26.0.11.tar.bz2.asc", + "version": "26.0.12", + "url": "https://download.nextcloud.com/server/releases/nextcloud-26.0.12.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-26.0.12.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From 3ff69e2c1d08ebb3cfbe98e395516a280198ed03 Mon Sep 17 00:00:00 2001 From: J0WI Date: Fri, 1 Mar 2024 22:44:44 +0000 Subject: [PATCH 038/123] Bump to 28.0.3 (Fix #2162) Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 9bbea92e..72253d63 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='27.1.6' +stable_channel='28.0.3' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From 0e725c6fa53a2aacc10dc65dc6dad684a4ece227 Mon Sep 17 00:00:00 2001 From: J0WI Date: Mon, 4 Mar 2024 21:00:00 +0000 Subject: [PATCH 039/123] Revert "update docker-entrypoint.sh" (#2175) --- docker-entrypoint.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 53f96466..5b627f07 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -276,10 +276,4 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi -echo "⚠️⚠️⚠️" -echo "This image is maintained by community volunteers and designed for expert use." -echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." -echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" -echo "⚠️⚠️⚠️ " - exec "$@" From 399f27e70738d34926d79cae7dbe56a1de39421e Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Mon, 4 Mar 2024 21:00:17 +0000 Subject: [PATCH 040/123] Runs update.sh --- 26/apache/entrypoint.sh | 6 ------ 26/fpm-alpine/entrypoint.sh | 6 ------ 26/fpm/entrypoint.sh | 6 ------ 27/apache/entrypoint.sh | 6 ------ 27/fpm-alpine/entrypoint.sh | 6 ------ 27/fpm/entrypoint.sh | 6 ------ 28/apache/entrypoint.sh | 6 ------ 28/fpm-alpine/entrypoint.sh | 6 ------ 28/fpm/entrypoint.sh | 6 ------ 9 files changed, 54 deletions(-) diff --git a/26/apache/entrypoint.sh b/26/apache/entrypoint.sh index 53f96466..5b627f07 100755 --- a/26/apache/entrypoint.sh +++ b/26/apache/entrypoint.sh @@ -276,10 +276,4 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi -echo "⚠️⚠️⚠️" -echo "This image is maintained by community volunteers and designed for expert use." -echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." -echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" -echo "⚠️⚠️⚠️ " - exec "$@" diff --git a/26/fpm-alpine/entrypoint.sh b/26/fpm-alpine/entrypoint.sh index 53f96466..5b627f07 100755 --- a/26/fpm-alpine/entrypoint.sh +++ b/26/fpm-alpine/entrypoint.sh @@ -276,10 +276,4 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi -echo "⚠️⚠️⚠️" -echo "This image is maintained by community volunteers and designed for expert use." -echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." -echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" -echo "⚠️⚠️⚠️ " - exec "$@" diff --git a/26/fpm/entrypoint.sh b/26/fpm/entrypoint.sh index 53f96466..5b627f07 100755 --- a/26/fpm/entrypoint.sh +++ b/26/fpm/entrypoint.sh @@ -276,10 +276,4 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi -echo "⚠️⚠️⚠️" -echo "This image is maintained by community volunteers and designed for expert use." -echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." -echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" -echo "⚠️⚠️⚠️ " - exec "$@" diff --git a/27/apache/entrypoint.sh b/27/apache/entrypoint.sh index 53f96466..5b627f07 100755 --- a/27/apache/entrypoint.sh +++ b/27/apache/entrypoint.sh @@ -276,10 +276,4 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi -echo "⚠️⚠️⚠️" -echo "This image is maintained by community volunteers and designed for expert use." -echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." -echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" -echo "⚠️⚠️⚠️ " - exec "$@" diff --git a/27/fpm-alpine/entrypoint.sh b/27/fpm-alpine/entrypoint.sh index 53f96466..5b627f07 100755 --- a/27/fpm-alpine/entrypoint.sh +++ b/27/fpm-alpine/entrypoint.sh @@ -276,10 +276,4 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi -echo "⚠️⚠️⚠️" -echo "This image is maintained by community volunteers and designed for expert use." -echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." -echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" -echo "⚠️⚠️⚠️ " - exec "$@" diff --git a/27/fpm/entrypoint.sh b/27/fpm/entrypoint.sh index 53f96466..5b627f07 100755 --- a/27/fpm/entrypoint.sh +++ b/27/fpm/entrypoint.sh @@ -276,10 +276,4 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi -echo "⚠️⚠️⚠️" -echo "This image is maintained by community volunteers and designed for expert use." -echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." -echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" -echo "⚠️⚠️⚠️ " - exec "$@" diff --git a/28/apache/entrypoint.sh b/28/apache/entrypoint.sh index 53f96466..5b627f07 100755 --- a/28/apache/entrypoint.sh +++ b/28/apache/entrypoint.sh @@ -276,10 +276,4 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi -echo "⚠️⚠️⚠️" -echo "This image is maintained by community volunteers and designed for expert use." -echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." -echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" -echo "⚠️⚠️⚠️ " - exec "$@" diff --git a/28/fpm-alpine/entrypoint.sh b/28/fpm-alpine/entrypoint.sh index 53f96466..5b627f07 100755 --- a/28/fpm-alpine/entrypoint.sh +++ b/28/fpm-alpine/entrypoint.sh @@ -276,10 +276,4 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi -echo "⚠️⚠️⚠️" -echo "This image is maintained by community volunteers and designed for expert use." -echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." -echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" -echo "⚠️⚠️⚠️ " - exec "$@" diff --git a/28/fpm/entrypoint.sh b/28/fpm/entrypoint.sh index 53f96466..5b627f07 100755 --- a/28/fpm/entrypoint.sh +++ b/28/fpm/entrypoint.sh @@ -276,10 +276,4 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP run_path before-starting fi -echo "⚠️⚠️⚠️" -echo "This image is maintained by community volunteers and designed for expert use." -echo "For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container maintained by Nextcloud GmbH." -echo "See https://github.com/nextcloud/all-in-one#nextcloud-all-in-one" -echo "⚠️⚠️⚠️ " - exec "$@" From 9034966f1a9d5d84930e836c7e63cc016bad9c5d Mon Sep 17 00:00:00 2001 From: J0WI Date: Mon, 4 Mar 2024 21:01:25 +0000 Subject: [PATCH 041/123] Remove Travis file (#2176) Signed-off-by: J0WI --- .travis/test-example-dockerfiles.sh | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100755 .travis/test-example-dockerfiles.sh diff --git a/.travis/test-example-dockerfiles.sh b/.travis/test-example-dockerfiles.sh deleted file mode 100755 index e28a7d7f..00000000 --- a/.travis/test-example-dockerfiles.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -set -e - -image="$1" - -cd .examples/dockerfiles - -dirs=( */ ) -dirs=( "${dirs[@]%/}" ) -for dir in "${dirs[@]}"; do - if [ -d "$dir/$VARIANT" ]; then - ( - cd "$dir/$VARIANT" - sed -ri -e 's/^FROM .*/FROM '"$image"'/g' 'Dockerfile' - docker build -t "$image-$dir" . - ) - fi -done From f9ce81fb7fa05e854bbdac7a180b267e2403e93c Mon Sep 17 00:00:00 2001 From: J0WI Date: Mon, 4 Mar 2024 21:50:47 +0000 Subject: [PATCH 042/123] Add FTP module back (#2152) (#2169) Signed-off-by: J0WI --- 26/apache/Dockerfile | 2 ++ 26/fpm-alpine/Dockerfile | 2 ++ 26/fpm/Dockerfile | 2 ++ 27/apache/Dockerfile | 2 ++ 27/fpm-alpine/Dockerfile | 2 ++ 27/fpm/Dockerfile | 2 ++ 28/apache/Dockerfile | 2 ++ 28/fpm-alpine/Dockerfile | 2 ++ 28/fpm/Dockerfile | 2 ++ Dockerfile-alpine.template | 2 ++ Dockerfile-debian.template | 2 ++ 11 files changed, 22 insertions(+) diff --git a/26/apache/Dockerfile b/26/apache/Dockerfile index 7c59ef34..8c11c63f 100644 --- a/26/apache/Dockerfile +++ b/26/apache/Dockerfile @@ -45,11 +45,13 @@ RUN set -ex; \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ docker-php-ext-install -j "$(nproc)" \ bcmath \ exif \ + ftp \ gd \ gmp \ intl \ diff --git a/26/fpm-alpine/Dockerfile b/26/fpm-alpine/Dockerfile index be623342..4c39c6be 100644 --- a/26/fpm-alpine/Dockerfile +++ b/26/fpm-alpine/Dockerfile @@ -36,11 +36,13 @@ RUN set -ex; \ postgresql-dev \ ; \ \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ docker-php-ext-configure ldap; \ docker-php-ext-install -j "$(nproc)" \ bcmath \ exif \ + ftp \ gd \ gmp \ intl \ diff --git a/26/fpm/Dockerfile b/26/fpm/Dockerfile index 610034d3..31574108 100644 --- a/26/fpm/Dockerfile +++ b/26/fpm/Dockerfile @@ -45,11 +45,13 @@ RUN set -ex; \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ docker-php-ext-install -j "$(nproc)" \ bcmath \ exif \ + ftp \ gd \ gmp \ intl \ diff --git a/27/apache/Dockerfile b/27/apache/Dockerfile index 64e94040..f6965648 100644 --- a/27/apache/Dockerfile +++ b/27/apache/Dockerfile @@ -45,11 +45,13 @@ RUN set -ex; \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ docker-php-ext-install -j "$(nproc)" \ bcmath \ exif \ + ftp \ gd \ gmp \ intl \ diff --git a/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index 20736951..f328b4be 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -36,11 +36,13 @@ RUN set -ex; \ postgresql-dev \ ; \ \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ docker-php-ext-configure ldap; \ docker-php-ext-install -j "$(nproc)" \ bcmath \ exif \ + ftp \ gd \ gmp \ intl \ diff --git a/27/fpm/Dockerfile b/27/fpm/Dockerfile index 482eef19..e888ff3b 100644 --- a/27/fpm/Dockerfile +++ b/27/fpm/Dockerfile @@ -45,11 +45,13 @@ RUN set -ex; \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ docker-php-ext-install -j "$(nproc)" \ bcmath \ exif \ + ftp \ gd \ gmp \ intl \ diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile index 364ab384..87a1e990 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -45,11 +45,13 @@ RUN set -ex; \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ docker-php-ext-install -j "$(nproc)" \ bcmath \ exif \ + ftp \ gd \ gmp \ intl \ diff --git a/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 7567896a..831d98b0 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -36,11 +36,13 @@ RUN set -ex; \ postgresql-dev \ ; \ \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ docker-php-ext-configure ldap; \ docker-php-ext-install -j "$(nproc)" \ bcmath \ exif \ + ftp \ gd \ gmp \ intl \ diff --git a/28/fpm/Dockerfile b/28/fpm/Dockerfile index f8629906..afd78ba5 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -45,11 +45,13 @@ RUN set -ex; \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ docker-php-ext-install -j "$(nproc)" \ bcmath \ exif \ + ftp \ gd \ gmp \ intl \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 905077bc..4553997a 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -35,11 +35,13 @@ RUN set -ex; \ postgresql-dev \ ; \ \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ docker-php-ext-configure ldap; \ docker-php-ext-install -j "$(nproc)" \ bcmath \ exif \ + ftp \ gd \ gmp \ intl \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index cea5d93b..8b66dd34 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -44,11 +44,13 @@ RUN set -ex; \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ docker-php-ext-install -j "$(nproc)" \ bcmath \ exif \ + ftp \ gd \ gmp \ intl \ From 6151f60208d08fe7dbd28b6b00a3bcd1e626e7ff Mon Sep 17 00:00:00 2001 From: J0WI Date: Tue, 5 Mar 2024 23:24:25 +0000 Subject: [PATCH 043/123] Update GitHub Actions (#2170) Signed-off-by: J0WI --- .github/workflows/images.yml | 6 +++--- .github/workflows/update-sh.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index ae9762a6..e8b70226 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -20,8 +20,8 @@ jobs: outputs: strategy: ${{ steps.generate-jobs.outputs.strategy }} steps: - - uses: actions/checkout@v3 - - uses: docker-library/bashbrew@v0.1.5 + - uses: actions/checkout@v4 + - uses: docker-library/bashbrew@HEAD - id: generate-jobs name: Generate Jobs run: | @@ -36,7 +36,7 @@ jobs: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Prepare Environment run: ${{ matrix.runs.prepare }} - name: Run update.sh script diff --git a/.github/workflows/update-sh.yml b/.github/workflows/update-sh.yml index 4e03239a..3b969c9e 100644 --- a/.github/workflows/update-sh.yml +++ b/.github/workflows/update-sh.yml @@ -13,7 +13,7 @@ jobs: name: Run update.sh script runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run update.sh script run: ./update.sh - name: Commit files From bc172f8dd22a648d5c166b854dceef958a2d4425 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Fri, 29 Mar 2024 00:27:30 +0000 Subject: [PATCH 044/123] Runs update.sh --- 26/apache/Dockerfile | 6 +++--- 26/fpm-alpine/Dockerfile | 6 +++--- 26/fpm/Dockerfile | 6 +++--- 27/apache/Dockerfile | 6 +++--- 27/fpm-alpine/Dockerfile | 6 +++--- 27/fpm/Dockerfile | 6 +++--- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/fpm/Dockerfile | 6 +++--- latest.txt | 2 +- versions.json | 18 +++++++++--------- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/26/apache/Dockerfile b/26/apache/Dockerfile index 8c11c63f..95585626 100644 --- a/26/apache/Dockerfile +++ b/26/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 26.0.12 +ENV NEXTCLOUD_VERSION 26.0.13 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-26.0.12.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.12.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.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/26/fpm-alpine/Dockerfile b/26/fpm-alpine/Dockerfile index 4c39c6be..fe9c75f8 100644 --- a/26/fpm-alpine/Dockerfile +++ b/26/fpm-alpine/Dockerfile @@ -113,7 +113,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 26.0.12 +ENV NEXTCLOUD_VERSION 26.0.13 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -121,8 +121,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.12.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.12.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.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/26/fpm/Dockerfile b/26/fpm/Dockerfile index 31574108..b74f1052 100644 --- a/26/fpm/Dockerfile +++ b/26/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 26.0.12 +ENV NEXTCLOUD_VERSION 26.0.13 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-26.0.12.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.12.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.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/27/apache/Dockerfile b/27/apache/Dockerfile index f6965648..853a3713 100644 --- a/27/apache/Dockerfile +++ b/27/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 27.1.7 +ENV NEXTCLOUD_VERSION 27.1.8 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-27.1.7.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.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/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index f328b4be..04ba1dcf 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -113,7 +113,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.7 +ENV NEXTCLOUD_VERSION 27.1.8 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -121,8 +121,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.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/27/fpm/Dockerfile b/27/fpm/Dockerfile index e888ff3b..ade6aaa3 100644 --- a/27/fpm/Dockerfile +++ b/27/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.7 +ENV NEXTCLOUD_VERSION 27.1.8 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-27.1.7.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.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/28/apache/Dockerfile b/28/apache/Dockerfile index 87a1e990..8bd19340 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.3 +ENV NEXTCLOUD_VERSION 28.0.4 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-28.0.3.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 831d98b0..c910afeb 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -113,7 +113,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.3 +ENV NEXTCLOUD_VERSION 28.0.4 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -121,8 +121,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index afd78ba5..ee9f27eb 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.3 +ENV NEXTCLOUD_VERSION 28.0.4 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-28.0.3.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.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 e4d87fa9..3ef31d3d 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -28.0.3 +28.0.4 diff --git a/versions.json b/versions.json index d71d84cf..f3a0fa1b 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "28": { "branch": "28", - "version": "28.0.3", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.3.tar.bz2.asc", + "version": "28.0.4", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -27,9 +27,9 @@ }, "27": { "branch": "27", - "version": "27.1.7", - "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.7.tar.bz2.asc", + "version": "27.1.8", + "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -53,9 +53,9 @@ }, "26": { "branch": "26", - "version": "26.0.12", - "url": "https://download.nextcloud.com/server/releases/nextcloud-26.0.12.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-26.0.12.tar.bz2.asc", + "version": "26.0.13", + "url": "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From 5abd7eacd5aba638063ac87634da1c431507da46 Mon Sep 17 00:00:00 2001 From: J0WI Date: Fri, 29 Mar 2024 14:21:20 +0000 Subject: [PATCH 045/123] Bump to 28.0.4 Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 72253d63..b0bad02f 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='28.0.3' +stable_channel='28.0.4' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From f23d5d3ab4af4a65ffea30d05d1d1a7a37cd4bc1 Mon Sep 17 00:00:00 2001 From: J0WI Date: Tue, 2 Apr 2024 21:27:11 +0000 Subject: [PATCH 046/123] Typo Signed-off-by: J0WI --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b02c66de..c73bbebf 100644 --- a/README.md +++ b/README.md @@ -320,7 +320,7 @@ services: Then run `docker-compose up -d`, now you can access Nextcloud at http://localhost:8080/ from your host system. ## Base version - FPM -When using the FPM image, you need another container that acts as web server on port 80 and proxies the requests to the Nextcloud container. In this example a simple nginx container is combined with the Nextcloud-fpm image and a MariaDB database container. The data is stored in docker volumes. The nginx container also needs access to static files from your Nextcloud installation. It gets access to all the volumes mounted to Nextcloud via the `volumes_from` option.The configuration for nginx is stored in the configuration file `nginx.conf`, that is mounted into the container. An example can be found in the examples section [here](https://github.com/nextcloud/docker/tree/master/.examples). +When using the FPM image, you need another container that acts as web server on port 80 and proxies the requests to the Nextcloud container. In this example a simple nginx container is combined with the Nextcloud-fpm image and a MariaDB database container. The data is stored in docker volumes. The nginx container also needs access to static files from your Nextcloud installation. It gets access to all the volumes mounted to Nextcloud via the `volumes_from` option. The configuration for nginx is stored in the configuration file `nginx.conf`, that is mounted into the container. An example can be found in the examples section [here](https://github.com/nextcloud/docker/tree/master/.examples). As this setup does **not include encryption**, it should be run behind a proxy. From f7b20139ebd35daea49138fd15232c5d812f4114 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Wed, 24 Apr 2024 00:28:00 +0000 Subject: [PATCH 047/123] Runs update.sh --- 29/apache/Dockerfile | 174 +++++++++++ .../config/apache-pretty-urls.config.php | 4 + 29/apache/config/apcu.config.php | 4 + 29/apache/config/apps.config.php | 15 + 29/apache/config/autoconfig.php | 41 +++ 29/apache/config/redis.config.php | 17 ++ 29/apache/config/reverse-proxy.config.php | 30 ++ 29/apache/config/s3.config.php | 48 +++ 29/apache/config/smtp.config.php | 22 ++ 29/apache/config/swift.config.php | 31 ++ .../config/upgrade-disable-web.config.php | 4 + 29/apache/cron.sh | 4 + 29/apache/entrypoint.sh | 279 ++++++++++++++++++ 29/apache/upgrade.exclude | 6 + 29/fpm-alpine/Dockerfile | 143 +++++++++ 29/fpm-alpine/config/apcu.config.php | 4 + 29/fpm-alpine/config/apps.config.php | 15 + 29/fpm-alpine/config/autoconfig.php | 41 +++ 29/fpm-alpine/config/redis.config.php | 17 ++ 29/fpm-alpine/config/reverse-proxy.config.php | 30 ++ 29/fpm-alpine/config/s3.config.php | 48 +++ 29/fpm-alpine/config/smtp.config.php | 22 ++ 29/fpm-alpine/config/swift.config.php | 31 ++ .../config/upgrade-disable-web.config.php | 4 + 29/fpm-alpine/cron.sh | 4 + 29/fpm-alpine/entrypoint.sh | 279 ++++++++++++++++++ 29/fpm-alpine/upgrade.exclude | 6 + 29/fpm/Dockerfile | 159 ++++++++++ 29/fpm/config/apcu.config.php | 4 + 29/fpm/config/apps.config.php | 15 + 29/fpm/config/autoconfig.php | 41 +++ 29/fpm/config/redis.config.php | 17 ++ 29/fpm/config/reverse-proxy.config.php | 30 ++ 29/fpm/config/s3.config.php | 48 +++ 29/fpm/config/smtp.config.php | 22 ++ 29/fpm/config/swift.config.php | 31 ++ 29/fpm/config/upgrade-disable-web.config.php | 4 + 29/fpm/cron.sh | 4 + 29/fpm/entrypoint.sh | 279 ++++++++++++++++++ 29/fpm/upgrade.exclude | 6 + latest.txt | 2 +- versions.json | 26 ++ 42 files changed, 2010 insertions(+), 1 deletion(-) create mode 100644 29/apache/Dockerfile create mode 100644 29/apache/config/apache-pretty-urls.config.php create mode 100644 29/apache/config/apcu.config.php create mode 100644 29/apache/config/apps.config.php create mode 100644 29/apache/config/autoconfig.php create mode 100644 29/apache/config/redis.config.php create mode 100644 29/apache/config/reverse-proxy.config.php create mode 100644 29/apache/config/s3.config.php create mode 100644 29/apache/config/smtp.config.php create mode 100644 29/apache/config/swift.config.php create mode 100644 29/apache/config/upgrade-disable-web.config.php create mode 100755 29/apache/cron.sh create mode 100755 29/apache/entrypoint.sh create mode 100644 29/apache/upgrade.exclude create mode 100644 29/fpm-alpine/Dockerfile create mode 100644 29/fpm-alpine/config/apcu.config.php create mode 100644 29/fpm-alpine/config/apps.config.php create mode 100644 29/fpm-alpine/config/autoconfig.php create mode 100644 29/fpm-alpine/config/redis.config.php create mode 100644 29/fpm-alpine/config/reverse-proxy.config.php create mode 100644 29/fpm-alpine/config/s3.config.php create mode 100644 29/fpm-alpine/config/smtp.config.php create mode 100644 29/fpm-alpine/config/swift.config.php create mode 100644 29/fpm-alpine/config/upgrade-disable-web.config.php create mode 100755 29/fpm-alpine/cron.sh create mode 100755 29/fpm-alpine/entrypoint.sh create mode 100644 29/fpm-alpine/upgrade.exclude create mode 100644 29/fpm/Dockerfile create mode 100644 29/fpm/config/apcu.config.php create mode 100644 29/fpm/config/apps.config.php create mode 100644 29/fpm/config/autoconfig.php create mode 100644 29/fpm/config/redis.config.php create mode 100644 29/fpm/config/reverse-proxy.config.php create mode 100644 29/fpm/config/s3.config.php create mode 100644 29/fpm/config/smtp.config.php create mode 100644 29/fpm/config/swift.config.php create mode 100644 29/fpm/config/upgrade-disable-web.config.php create mode 100755 29/fpm/cron.sh create mode 100755 29/fpm/entrypoint.sh create mode 100644 29/fpm/upgrade.exclude diff --git a/29/apache/Dockerfile b/29/apache/Dockerfile new file mode 100644 index 00000000..eb44e77c --- /dev/null +++ b/29/apache/Dockerfile @@ -0,0 +1,174 @@ +# DO NOT EDIT: created by update.sh from Dockerfile-debian.template +FROM php:8.2-apache-bookworm + +# entrypoint.sh and cron.sh dependencies +RUN set -ex; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + busybox-static \ + bzip2 \ + libldap-common \ + libmagickcore-6.q16-6-extra \ + rsync \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ + mkdir -p /var/spool/cron/crontabs; \ + echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data + +# install the PHP extensions we need +# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html +ENV PHP_MEMORY_LIMIT 512M +ENV PHP_UPLOAD_LIMIT 512M +RUN set -ex; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + libcurl4-openssl-dev \ + libevent-dev \ + libfreetype6-dev \ + libgmp-dev \ + libicu-dev \ + libjpeg-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libpng-dev \ + libpq-dev \ + libwebp-dev \ + libxml2-dev \ + libzip-dev \ + ; \ + \ + debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ + docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ + docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ + docker-php-ext-install -j "$(nproc)" \ + bcmath \ + exif \ + ftp \ + gd \ + gmp \ + intl \ + ldap \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + sysvsem \ + zip \ + ; \ + \ +# pecl will claim success even if one install fails, so we need to perform each install separately + pecl install APCu-5.1.23; \ + pecl install imagick-3.7.0; \ + pecl install memcached-3.2.0; \ + pecl install redis-6.0.2; \ + \ + docker-php-ext-enable \ + apcu \ + imagick \ + memcached \ + redis \ + ; \ + rm -r /tmp/pear; \ + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark; \ + ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -rt apt-mark manual; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/* + +# set recommended PHP.ini settings +# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache +RUN { \ + echo 'opcache.enable=1'; \ + echo 'opcache.interned_strings_buffer=32'; \ + echo 'opcache.max_accelerated_files=10000'; \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.save_comments=1'; \ + echo 'opcache.revalidate_freq=60'; \ + echo 'opcache.jit=1255'; \ + echo 'opcache.jit_buffer_size=128M'; \ + } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ + \ + echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ + \ + { \ + echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ + echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ + echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ + \ + mkdir /var/www/data; \ + mkdir -p /docker-entrypoint-hooks.d/pre-installation \ + /docker-entrypoint-hooks.d/post-installation \ + /docker-entrypoint-hooks.d/pre-upgrade \ + /docker-entrypoint-hooks.d/post-upgrade \ + /docker-entrypoint-hooks.d/before-starting; \ + chown -R www-data:root /var/www; \ + chmod -R g=u /var/www + +VOLUME /var/www/html + +RUN a2enmod headers rewrite remoteip ; \ + { \ + echo 'RemoteIPHeader X-Real-IP'; \ + echo 'RemoteIPInternalProxy 10.0.0.0/8'; \ + echo 'RemoteIPInternalProxy 172.16.0.0/12'; \ + echo 'RemoteIPInternalProxy 192.168.0.0/16'; \ + } > /etc/apache2/conf-available/remoteip.conf; \ + a2enconf remoteip + +# set apache config LimitRequestBody +ENV APACHE_BODY_LIMIT 1073741824 +RUN { \ + echo 'LimitRequestBody ${APACHE_BODY_LIMIT}'; \ + } > /etc/apache2/conf-available/apache-limits.conf; \ + a2enconf apache-limits + +ENV NEXTCLOUD_VERSION 29.0.0 + +RUN set -ex; \ + fetchDeps=" \ + gnupg \ + dirmngr \ + "; \ + 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.0.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.0.tar.bz2.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ +# gpg key from https://nextcloud.com/nextcloud.asc + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ + gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ + gpgconf --kill all; \ + rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ + mkdir -p /usr/src/nextcloud/data; \ + 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; \ + rm -rf /var/lib/apt/lists/* + +COPY *.sh upgrade.exclude / +COPY config/* /usr/src/nextcloud/config/ + +ENTRYPOINT ["/entrypoint.sh"] +CMD ["apache2-foreground"] diff --git a/29/apache/config/apache-pretty-urls.config.php b/29/apache/config/apache-pretty-urls.config.php new file mode 100644 index 00000000..72da1d8c --- /dev/null +++ b/29/apache/config/apache-pretty-urls.config.php @@ -0,0 +1,4 @@ + '/', +); diff --git a/29/apache/config/apcu.config.php b/29/apache/config/apcu.config.php new file mode 100644 index 00000000..69fed876 --- /dev/null +++ b/29/apache/config/apcu.config.php @@ -0,0 +1,4 @@ + '\OC\Memcache\APCu', +); diff --git a/29/apache/config/apps.config.php b/29/apache/config/apps.config.php new file mode 100644 index 00000000..4c37f72a --- /dev/null +++ b/29/apache/config/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + 'path' => OC::$SERVERROOT.'/apps', + 'url' => '/apps', + 'writable' => false, + ), + 1 => array ( + 'path' => OC::$SERVERROOT.'/custom_apps', + 'url' => '/custom_apps', + 'writable' => true, + ), + ), +); diff --git a/29/apache/config/autoconfig.php b/29/apache/config/autoconfig.php new file mode 100644 index 00000000..92ad2a1c --- /dev/null +++ b/29/apache/config/autoconfig.php @@ -0,0 +1,41 @@ + '\OC\Memcache\Redis', + 'memcache.locking' => '\OC\Memcache\Redis', + 'redis' => array( + 'host' => getenv('REDIS_HOST'), + 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + ), + ); + + if (getenv('REDIS_HOST_PORT') !== false) { + $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); + } elseif (getenv('REDIS_HOST')[0] != '/') { + $CONFIG['redis']['port'] = 6379; + } +} diff --git a/29/apache/config/reverse-proxy.config.php b/29/apache/config/reverse-proxy.config.php new file mode 100644 index 00000000..7df0415e --- /dev/null +++ b/29/apache/config/reverse-proxy.config.php @@ -0,0 +1,30 @@ + array( + 'class' => '\OC\Files\ObjectStore\S3', + 'arguments' => array( + 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), + 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', + 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', + 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', + 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", + 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, + 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + // required for some non Amazon S3 implementations + 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', + // required for older protocol versions + 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' + ) + ) + ); + + if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_KEY')) { + $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); + } else { + $CONFIG['objectstore']['arguments']['key'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SECRET')) { + $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); + } else { + $CONFIG['objectstore']['arguments']['secret'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } +} diff --git a/29/apache/config/smtp.config.php b/29/apache/config/smtp.config.php new file mode 100644 index 00000000..5006fe47 --- /dev/null +++ b/29/apache/config/smtp.config.php @@ -0,0 +1,22 @@ + 'smtp', + 'mail_smtphost' => getenv('SMTP_HOST'), + 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', + 'mail_smtpname' => getenv('SMTP_NAME') ?: '', + 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), + 'mail_domain' => getenv('MAIL_DOMAIN'), + ); + + if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); + } elseif (getenv('SMTP_PASSWORD')) { + $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); + } else { + $CONFIG['mail_smtppassword'] = ''; + } +} diff --git a/29/apache/config/swift.config.php b/29/apache/config/swift.config.php new file mode 100644 index 00000000..47ada566 --- /dev/null +++ b/29/apache/config/swift.config.php @@ -0,0 +1,31 @@ + [ + 'class' => 'OC\\Files\\ObjectStore\\Swift', + 'arguments' => [ + 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', + 'user' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), + 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', + ], + ], + 'scope' => [ + 'project' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', + ], + ], + ], + 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', + 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), + 'url' => getenv('OBJECTSTORE_SWIFT_URL'), + 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), + ] + ] + ); +} diff --git a/29/apache/config/upgrade-disable-web.config.php b/29/apache/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/29/apache/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/29/apache/cron.sh b/29/apache/cron.sh new file mode 100755 index 00000000..b4cd9af6 --- /dev/null +++ b/29/apache/cron.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -eu + +exec busybox crond -f -L /dev/stdout diff --git a/29/apache/entrypoint.sh b/29/apache/entrypoint.sh new file mode 100755 index 00000000..5b627f07 --- /dev/null +++ b/29/apache/entrypoint.sh @@ -0,0 +1,279 @@ +#!/bin/sh +set -eu + +# version_greater A B returns whether A > B +version_greater() { + [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] +} + +# return true if specified directory is empty +directory_empty() { + [ -z "$(ls -A "$1/")" ] +} + +run_as() { + if [ "$(id -u)" = 0 ]; then + su -p "$user" -s /bin/sh -c "$1" + else + sh -c "$1" + fi +} + +# Execute all executable files in a given directory in alphanumeric order +run_path() { + local hook_folder_path="/docker-entrypoint-hooks.d/$1" + local return_code=0 + + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" + return 0 + fi + + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + + ( + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" + continue + fi + + echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" + + run_as "${script_file_path}" || return_code="$?" + + if [ "${return_code}" -ne "0" ]; then + echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" + exit 1 + fi + + echo "==> Finished the script: \"${script_file_path}\"" + done + ) +} + +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' +# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of +# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") + local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") + if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then + echo >&2 "error: both $var and $fileVar are set (but are exclusive)" + exit 1 + fi + if [ -n "${varValue}" ]; then + export "$var"="${varValue}" + elif [ -n "${fileVarValue}" ]; then + export "$var"="$(cat "${fileVarValue}")" + elif [ -n "${def}" ]; then + export "$var"="$def" + fi + unset "$fileVar" +} + +if expr "$1" : "apache" 1>/dev/null; then + if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then + a2disconf remoteip + fi +fi + +if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + uid="$(id -u)" + gid="$(id -g)" + if [ "$uid" = '0' ]; then + case "$1" in + apache2*) + user="${APACHE_RUN_USER:-www-data}" + group="${APACHE_RUN_GROUP:-www-data}" + + # strip off any '#' symbol ('#1000' is valid syntax for Apache) + user="${user#'#'}" + group="${group#'#'}" + ;; + *) # php-fpm + user='www-data' + group='www-data' + ;; + esac + else + user="$uid" + group="$gid" + fi + + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + file_env REDIS_HOST_PASSWORD + echo 'session.save_handler = redis' + # check if redis host is an unix socket path + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then + if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then + echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" + else + echo "session.save_path = \"unix://${REDIS_HOST}\"" + 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}\"" + else + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + 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. + ( + if ! flock -n 9; then + # If we couldn't get it immediately, show a message, then wait for real + echo "Another process is initializing Nextcloud. Waiting..." + flock 9 + fi + + installed_version="0.0.0.0" + if [ -f /var/www/html/version.php ]; then + # shellcheck disable=SC2016 + installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" + fi + # shellcheck disable=SC2016 + image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" + + if version_greater "$installed_version" "$image_version"; then + echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" + exit 1 + fi + + if version_greater "$image_version" "$installed_version"; then + echo "Initializing nextcloud $image_version ..." + if [ "$installed_version" != "0.0.0.0" ]; then + if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then + echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." + echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." + exit 1 + fi + echo "Upgrading nextcloud from $installed_version ..." + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before + fi + if [ "$(id -u)" = 0 ]; then + rsync_options="-rlDog --chown $user:$group" + else + rsync_options="-rlD" + fi + + rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ + for dir in config data custom_apps themes; do + if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then + rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + fi + done + rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + + # Install + if [ "$installed_version" = "0.0.0.0" ]; then + echo "New nextcloud instance" + + file_env NEXTCLOUD_ADMIN_PASSWORD + file_env NEXTCLOUD_ADMIN_USER + + if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then + # shellcheck disable=SC2016 + install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' + if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then + # shellcheck disable=SC2016 + install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' + fi + + file_env MYSQL_DATABASE + file_env MYSQL_PASSWORD + file_env MYSQL_USER + file_env POSTGRES_DB + file_env POSTGRES_PASSWORD + file_env POSTGRES_USER + + install=false + if [ -n "${SQLITE_DATABASE+x}" ]; then + echo "Installing with SQLite database" + # shellcheck disable=SC2016 + install_options=$install_options' --database-name "$SQLITE_DATABASE"' + install=true + elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then + echo "Installing with MySQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' + install=true + elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then + echo "Installing with PostgreSQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' + install=true + fi + + if [ "$install" = true ]; then + run_path pre-installation + + echo "Starting nextcloud installation" + max_retries=10 + try=0 + until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + do + echo "Retrying install..." + try=$((try+1)) + sleep 10s + done + if [ "$try" -gt "$max_retries" ]; then + echo "Installing of nextcloud failed!" + exit 1 + fi + if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then + echo "Setting trusted domains…" + NC_TRUSTED_DOMAIN_IDX=1 + for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do + DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" + NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) + done + fi + + run_path post-installation + else + echo "Please run the web-based installer on first connect!" + fi + fi + # Upgrade + else + run_path pre-upgrade + + run_as 'php /var/www/html/occ upgrade' + + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after + echo "The following apps have been disabled:" + diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 + rm -f /tmp/list_before /tmp/list_after + + run_path post-upgrade + fi + + echo "Initializing finished" + fi + + # Update htaccess after init if requested + if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then + run_as 'php /var/www/html/occ maintenance:update:htaccess' + fi + ) 9> /var/www/html/nextcloud-init-sync.lock + + run_path before-starting +fi + +exec "$@" diff --git a/29/apache/upgrade.exclude b/29/apache/upgrade.exclude new file mode 100644 index 00000000..31ce39a8 --- /dev/null +++ b/29/apache/upgrade.exclude @@ -0,0 +1,6 @@ +/config/ +/data/ +/custom_apps/ +/themes/ +/version.php +/nextcloud-init-sync.lock diff --git a/29/fpm-alpine/Dockerfile b/29/fpm-alpine/Dockerfile new file mode 100644 index 00000000..76a42bf1 --- /dev/null +++ b/29/fpm-alpine/Dockerfile @@ -0,0 +1,143 @@ +# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template +FROM php:8.2-fpm-alpine3.19 + +# entrypoint.sh and cron.sh dependencies +RUN set -ex; \ + \ + apk add --no-cache \ + imagemagick \ + rsync \ + ; \ + \ + rm /var/spool/cron/crontabs/root; \ + echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data + +# install the PHP extensions we need +# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html +RUN set -ex; \ + \ + apk add --no-cache --virtual .build-deps \ + $PHPIZE_DEPS \ + autoconf \ + freetype-dev \ + gmp-dev \ + icu-dev \ + imagemagick-dev \ + libevent-dev \ + libjpeg-turbo-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libpng-dev \ + libwebp-dev \ + libxml2-dev \ + libzip-dev \ + openldap-dev \ + pcre-dev \ + postgresql-dev \ + ; \ + \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ + docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ + docker-php-ext-configure ldap; \ + docker-php-ext-install -j "$(nproc)" \ + bcmath \ + exif \ + ftp \ + gd \ + gmp \ + intl \ + ldap \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + sysvsem \ + zip \ + ; \ + \ +# pecl will claim success even if one install fails, so we need to perform each install separately + pecl install APCu-5.1.23; \ + pecl install imagick-3.7.0; \ + pecl install memcached-3.2.0; \ + pecl install redis-6.0.2; \ + \ + docker-php-ext-enable \ + apcu \ + imagick \ + memcached \ + redis \ + ; \ + rm -r /tmp/pear; \ + \ + runDeps="$( \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ + | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ + )"; \ + apk add --no-network --virtual .nextcloud-phpext-rundeps $runDeps; \ + apk del --no-network .build-deps + +# set recommended PHP.ini settings +# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache +ENV PHP_MEMORY_LIMIT 512M +ENV PHP_UPLOAD_LIMIT 512M +RUN { \ + echo 'opcache.enable=1'; \ + echo 'opcache.interned_strings_buffer=32'; \ + echo 'opcache.max_accelerated_files=10000'; \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.save_comments=1'; \ + echo 'opcache.revalidate_freq=60'; \ + echo 'opcache.jit=1255'; \ + echo 'opcache.jit_buffer_size=128M'; \ + } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ + \ + echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ + \ + { \ + echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ + echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ + echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ + \ + mkdir /var/www/data; \ + mkdir -p /docker-entrypoint-hooks.d/pre-installation \ + /docker-entrypoint-hooks.d/post-installation \ + /docker-entrypoint-hooks.d/pre-upgrade \ + /docker-entrypoint-hooks.d/post-upgrade \ + /docker-entrypoint-hooks.d/before-starting; \ + chown -R www-data:root /var/www; \ + chmod -R g=u /var/www + +VOLUME /var/www/html + + +ENV NEXTCLOUD_VERSION 29.0.0 + +RUN set -ex; \ + apk add --no-cache --virtual .fetch-deps \ + bzip2 \ + gnupg \ + ; \ + \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.0.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.0.tar.bz2.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ +# gpg key from https://nextcloud.com/nextcloud.asc + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ + gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ + gpgconf --kill all; \ + rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ + mkdir -p /usr/src/nextcloud/data; \ + mkdir -p /usr/src/nextcloud/custom_apps; \ + chmod +x /usr/src/nextcloud/occ; \ + apk del --no-network .fetch-deps + +COPY *.sh upgrade.exclude / +COPY config/* /usr/src/nextcloud/config/ + +ENTRYPOINT ["/entrypoint.sh"] +CMD ["php-fpm"] diff --git a/29/fpm-alpine/config/apcu.config.php b/29/fpm-alpine/config/apcu.config.php new file mode 100644 index 00000000..69fed876 --- /dev/null +++ b/29/fpm-alpine/config/apcu.config.php @@ -0,0 +1,4 @@ + '\OC\Memcache\APCu', +); diff --git a/29/fpm-alpine/config/apps.config.php b/29/fpm-alpine/config/apps.config.php new file mode 100644 index 00000000..4c37f72a --- /dev/null +++ b/29/fpm-alpine/config/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + 'path' => OC::$SERVERROOT.'/apps', + 'url' => '/apps', + 'writable' => false, + ), + 1 => array ( + 'path' => OC::$SERVERROOT.'/custom_apps', + 'url' => '/custom_apps', + 'writable' => true, + ), + ), +); diff --git a/29/fpm-alpine/config/autoconfig.php b/29/fpm-alpine/config/autoconfig.php new file mode 100644 index 00000000..92ad2a1c --- /dev/null +++ b/29/fpm-alpine/config/autoconfig.php @@ -0,0 +1,41 @@ + '\OC\Memcache\Redis', + 'memcache.locking' => '\OC\Memcache\Redis', + 'redis' => array( + 'host' => getenv('REDIS_HOST'), + 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + ), + ); + + if (getenv('REDIS_HOST_PORT') !== false) { + $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); + } elseif (getenv('REDIS_HOST')[0] != '/') { + $CONFIG['redis']['port'] = 6379; + } +} diff --git a/29/fpm-alpine/config/reverse-proxy.config.php b/29/fpm-alpine/config/reverse-proxy.config.php new file mode 100644 index 00000000..7df0415e --- /dev/null +++ b/29/fpm-alpine/config/reverse-proxy.config.php @@ -0,0 +1,30 @@ + array( + 'class' => '\OC\Files\ObjectStore\S3', + 'arguments' => array( + 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), + 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', + 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', + 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', + 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", + 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, + 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + // required for some non Amazon S3 implementations + 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', + // required for older protocol versions + 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' + ) + ) + ); + + if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_KEY')) { + $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); + } else { + $CONFIG['objectstore']['arguments']['key'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SECRET')) { + $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); + } else { + $CONFIG['objectstore']['arguments']['secret'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } +} diff --git a/29/fpm-alpine/config/smtp.config.php b/29/fpm-alpine/config/smtp.config.php new file mode 100644 index 00000000..5006fe47 --- /dev/null +++ b/29/fpm-alpine/config/smtp.config.php @@ -0,0 +1,22 @@ + 'smtp', + 'mail_smtphost' => getenv('SMTP_HOST'), + 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', + 'mail_smtpname' => getenv('SMTP_NAME') ?: '', + 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), + 'mail_domain' => getenv('MAIL_DOMAIN'), + ); + + if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); + } elseif (getenv('SMTP_PASSWORD')) { + $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); + } else { + $CONFIG['mail_smtppassword'] = ''; + } +} diff --git a/29/fpm-alpine/config/swift.config.php b/29/fpm-alpine/config/swift.config.php new file mode 100644 index 00000000..47ada566 --- /dev/null +++ b/29/fpm-alpine/config/swift.config.php @@ -0,0 +1,31 @@ + [ + 'class' => 'OC\\Files\\ObjectStore\\Swift', + 'arguments' => [ + 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', + 'user' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), + 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', + ], + ], + 'scope' => [ + 'project' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', + ], + ], + ], + 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', + 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), + 'url' => getenv('OBJECTSTORE_SWIFT_URL'), + 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), + ] + ] + ); +} diff --git a/29/fpm-alpine/config/upgrade-disable-web.config.php b/29/fpm-alpine/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/29/fpm-alpine/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/29/fpm-alpine/cron.sh b/29/fpm-alpine/cron.sh new file mode 100755 index 00000000..b4cd9af6 --- /dev/null +++ b/29/fpm-alpine/cron.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -eu + +exec busybox crond -f -L /dev/stdout diff --git a/29/fpm-alpine/entrypoint.sh b/29/fpm-alpine/entrypoint.sh new file mode 100755 index 00000000..5b627f07 --- /dev/null +++ b/29/fpm-alpine/entrypoint.sh @@ -0,0 +1,279 @@ +#!/bin/sh +set -eu + +# version_greater A B returns whether A > B +version_greater() { + [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] +} + +# return true if specified directory is empty +directory_empty() { + [ -z "$(ls -A "$1/")" ] +} + +run_as() { + if [ "$(id -u)" = 0 ]; then + su -p "$user" -s /bin/sh -c "$1" + else + sh -c "$1" + fi +} + +# Execute all executable files in a given directory in alphanumeric order +run_path() { + local hook_folder_path="/docker-entrypoint-hooks.d/$1" + local return_code=0 + + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" + return 0 + fi + + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + + ( + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" + continue + fi + + echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" + + run_as "${script_file_path}" || return_code="$?" + + if [ "${return_code}" -ne "0" ]; then + echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" + exit 1 + fi + + echo "==> Finished the script: \"${script_file_path}\"" + done + ) +} + +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' +# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of +# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") + local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") + if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then + echo >&2 "error: both $var and $fileVar are set (but are exclusive)" + exit 1 + fi + if [ -n "${varValue}" ]; then + export "$var"="${varValue}" + elif [ -n "${fileVarValue}" ]; then + export "$var"="$(cat "${fileVarValue}")" + elif [ -n "${def}" ]; then + export "$var"="$def" + fi + unset "$fileVar" +} + +if expr "$1" : "apache" 1>/dev/null; then + if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then + a2disconf remoteip + fi +fi + +if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + uid="$(id -u)" + gid="$(id -g)" + if [ "$uid" = '0' ]; then + case "$1" in + apache2*) + user="${APACHE_RUN_USER:-www-data}" + group="${APACHE_RUN_GROUP:-www-data}" + + # strip off any '#' symbol ('#1000' is valid syntax for Apache) + user="${user#'#'}" + group="${group#'#'}" + ;; + *) # php-fpm + user='www-data' + group='www-data' + ;; + esac + else + user="$uid" + group="$gid" + fi + + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + file_env REDIS_HOST_PASSWORD + echo 'session.save_handler = redis' + # check if redis host is an unix socket path + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then + if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then + echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" + else + echo "session.save_path = \"unix://${REDIS_HOST}\"" + 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}\"" + else + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + 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. + ( + if ! flock -n 9; then + # If we couldn't get it immediately, show a message, then wait for real + echo "Another process is initializing Nextcloud. Waiting..." + flock 9 + fi + + installed_version="0.0.0.0" + if [ -f /var/www/html/version.php ]; then + # shellcheck disable=SC2016 + installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" + fi + # shellcheck disable=SC2016 + image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" + + if version_greater "$installed_version" "$image_version"; then + echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" + exit 1 + fi + + if version_greater "$image_version" "$installed_version"; then + echo "Initializing nextcloud $image_version ..." + if [ "$installed_version" != "0.0.0.0" ]; then + if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then + echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." + echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." + exit 1 + fi + echo "Upgrading nextcloud from $installed_version ..." + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before + fi + if [ "$(id -u)" = 0 ]; then + rsync_options="-rlDog --chown $user:$group" + else + rsync_options="-rlD" + fi + + rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ + for dir in config data custom_apps themes; do + if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then + rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + fi + done + rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + + # Install + if [ "$installed_version" = "0.0.0.0" ]; then + echo "New nextcloud instance" + + file_env NEXTCLOUD_ADMIN_PASSWORD + file_env NEXTCLOUD_ADMIN_USER + + if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then + # shellcheck disable=SC2016 + install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' + if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then + # shellcheck disable=SC2016 + install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' + fi + + file_env MYSQL_DATABASE + file_env MYSQL_PASSWORD + file_env MYSQL_USER + file_env POSTGRES_DB + file_env POSTGRES_PASSWORD + file_env POSTGRES_USER + + install=false + if [ -n "${SQLITE_DATABASE+x}" ]; then + echo "Installing with SQLite database" + # shellcheck disable=SC2016 + install_options=$install_options' --database-name "$SQLITE_DATABASE"' + install=true + elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then + echo "Installing with MySQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' + install=true + elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then + echo "Installing with PostgreSQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' + install=true + fi + + if [ "$install" = true ]; then + run_path pre-installation + + echo "Starting nextcloud installation" + max_retries=10 + try=0 + until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + do + echo "Retrying install..." + try=$((try+1)) + sleep 10s + done + if [ "$try" -gt "$max_retries" ]; then + echo "Installing of nextcloud failed!" + exit 1 + fi + if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then + echo "Setting trusted domains…" + NC_TRUSTED_DOMAIN_IDX=1 + for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do + DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" + NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) + done + fi + + run_path post-installation + else + echo "Please run the web-based installer on first connect!" + fi + fi + # Upgrade + else + run_path pre-upgrade + + run_as 'php /var/www/html/occ upgrade' + + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after + echo "The following apps have been disabled:" + diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 + rm -f /tmp/list_before /tmp/list_after + + run_path post-upgrade + fi + + echo "Initializing finished" + fi + + # Update htaccess after init if requested + if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then + run_as 'php /var/www/html/occ maintenance:update:htaccess' + fi + ) 9> /var/www/html/nextcloud-init-sync.lock + + run_path before-starting +fi + +exec "$@" diff --git a/29/fpm-alpine/upgrade.exclude b/29/fpm-alpine/upgrade.exclude new file mode 100644 index 00000000..31ce39a8 --- /dev/null +++ b/29/fpm-alpine/upgrade.exclude @@ -0,0 +1,6 @@ +/config/ +/data/ +/custom_apps/ +/themes/ +/version.php +/nextcloud-init-sync.lock diff --git a/29/fpm/Dockerfile b/29/fpm/Dockerfile new file mode 100644 index 00000000..6127a79b --- /dev/null +++ b/29/fpm/Dockerfile @@ -0,0 +1,159 @@ +# DO NOT EDIT: created by update.sh from Dockerfile-debian.template +FROM php:8.2-fpm-bookworm + +# entrypoint.sh and cron.sh dependencies +RUN set -ex; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + busybox-static \ + bzip2 \ + libldap-common \ + libmagickcore-6.q16-6-extra \ + rsync \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ + mkdir -p /var/spool/cron/crontabs; \ + echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data + +# install the PHP extensions we need +# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html +ENV PHP_MEMORY_LIMIT 512M +ENV PHP_UPLOAD_LIMIT 512M +RUN set -ex; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + libcurl4-openssl-dev \ + libevent-dev \ + libfreetype6-dev \ + libgmp-dev \ + libicu-dev \ + libjpeg-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libpng-dev \ + libpq-dev \ + libwebp-dev \ + libxml2-dev \ + libzip-dev \ + ; \ + \ + debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ + docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ + docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ + docker-php-ext-install -j "$(nproc)" \ + bcmath \ + exif \ + ftp \ + gd \ + gmp \ + intl \ + ldap \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + sysvsem \ + zip \ + ; \ + \ +# pecl will claim success even if one install fails, so we need to perform each install separately + pecl install APCu-5.1.23; \ + pecl install imagick-3.7.0; \ + pecl install memcached-3.2.0; \ + pecl install redis-6.0.2; \ + \ + docker-php-ext-enable \ + apcu \ + imagick \ + memcached \ + redis \ + ; \ + rm -r /tmp/pear; \ + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark; \ + ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -rt apt-mark manual; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/* + +# set recommended PHP.ini settings +# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache +RUN { \ + echo 'opcache.enable=1'; \ + echo 'opcache.interned_strings_buffer=32'; \ + echo 'opcache.max_accelerated_files=10000'; \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.save_comments=1'; \ + echo 'opcache.revalidate_freq=60'; \ + echo 'opcache.jit=1255'; \ + echo 'opcache.jit_buffer_size=128M'; \ + } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ + \ + echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ + \ + { \ + echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ + echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ + echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ + \ + mkdir /var/www/data; \ + mkdir -p /docker-entrypoint-hooks.d/pre-installation \ + /docker-entrypoint-hooks.d/post-installation \ + /docker-entrypoint-hooks.d/pre-upgrade \ + /docker-entrypoint-hooks.d/post-upgrade \ + /docker-entrypoint-hooks.d/before-starting; \ + chown -R www-data:root /var/www; \ + chmod -R g=u /var/www + +VOLUME /var/www/html + + +ENV NEXTCLOUD_VERSION 29.0.0 + +RUN set -ex; \ + fetchDeps=" \ + gnupg \ + dirmngr \ + "; \ + 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.0.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.0.tar.bz2.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ +# gpg key from https://nextcloud.com/nextcloud.asc + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ + gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ + gpgconf --kill all; \ + rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ + mkdir -p /usr/src/nextcloud/data; \ + 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; \ + rm -rf /var/lib/apt/lists/* + +COPY *.sh upgrade.exclude / +COPY config/* /usr/src/nextcloud/config/ + +ENTRYPOINT ["/entrypoint.sh"] +CMD ["php-fpm"] diff --git a/29/fpm/config/apcu.config.php b/29/fpm/config/apcu.config.php new file mode 100644 index 00000000..69fed876 --- /dev/null +++ b/29/fpm/config/apcu.config.php @@ -0,0 +1,4 @@ + '\OC\Memcache\APCu', +); diff --git a/29/fpm/config/apps.config.php b/29/fpm/config/apps.config.php new file mode 100644 index 00000000..4c37f72a --- /dev/null +++ b/29/fpm/config/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + 'path' => OC::$SERVERROOT.'/apps', + 'url' => '/apps', + 'writable' => false, + ), + 1 => array ( + 'path' => OC::$SERVERROOT.'/custom_apps', + 'url' => '/custom_apps', + 'writable' => true, + ), + ), +); diff --git a/29/fpm/config/autoconfig.php b/29/fpm/config/autoconfig.php new file mode 100644 index 00000000..92ad2a1c --- /dev/null +++ b/29/fpm/config/autoconfig.php @@ -0,0 +1,41 @@ + '\OC\Memcache\Redis', + 'memcache.locking' => '\OC\Memcache\Redis', + 'redis' => array( + 'host' => getenv('REDIS_HOST'), + 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + ), + ); + + if (getenv('REDIS_HOST_PORT') !== false) { + $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); + } elseif (getenv('REDIS_HOST')[0] != '/') { + $CONFIG['redis']['port'] = 6379; + } +} diff --git a/29/fpm/config/reverse-proxy.config.php b/29/fpm/config/reverse-proxy.config.php new file mode 100644 index 00000000..7df0415e --- /dev/null +++ b/29/fpm/config/reverse-proxy.config.php @@ -0,0 +1,30 @@ + array( + 'class' => '\OC\Files\ObjectStore\S3', + 'arguments' => array( + 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), + 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', + 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', + 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', + 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", + 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, + 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + // required for some non Amazon S3 implementations + 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', + // required for older protocol versions + 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' + ) + ) + ); + + if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_KEY')) { + $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); + } else { + $CONFIG['objectstore']['arguments']['key'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SECRET')) { + $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); + } else { + $CONFIG['objectstore']['arguments']['secret'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } +} diff --git a/29/fpm/config/smtp.config.php b/29/fpm/config/smtp.config.php new file mode 100644 index 00000000..5006fe47 --- /dev/null +++ b/29/fpm/config/smtp.config.php @@ -0,0 +1,22 @@ + 'smtp', + 'mail_smtphost' => getenv('SMTP_HOST'), + 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', + 'mail_smtpname' => getenv('SMTP_NAME') ?: '', + 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), + 'mail_domain' => getenv('MAIL_DOMAIN'), + ); + + if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); + } elseif (getenv('SMTP_PASSWORD')) { + $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); + } else { + $CONFIG['mail_smtppassword'] = ''; + } +} diff --git a/29/fpm/config/swift.config.php b/29/fpm/config/swift.config.php new file mode 100644 index 00000000..47ada566 --- /dev/null +++ b/29/fpm/config/swift.config.php @@ -0,0 +1,31 @@ + [ + 'class' => 'OC\\Files\\ObjectStore\\Swift', + 'arguments' => [ + 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', + 'user' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), + 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', + ], + ], + 'scope' => [ + 'project' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', + ], + ], + ], + 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', + 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), + 'url' => getenv('OBJECTSTORE_SWIFT_URL'), + 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), + ] + ] + ); +} diff --git a/29/fpm/config/upgrade-disable-web.config.php b/29/fpm/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/29/fpm/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/29/fpm/cron.sh b/29/fpm/cron.sh new file mode 100755 index 00000000..b4cd9af6 --- /dev/null +++ b/29/fpm/cron.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -eu + +exec busybox crond -f -L /dev/stdout diff --git a/29/fpm/entrypoint.sh b/29/fpm/entrypoint.sh new file mode 100755 index 00000000..5b627f07 --- /dev/null +++ b/29/fpm/entrypoint.sh @@ -0,0 +1,279 @@ +#!/bin/sh +set -eu + +# version_greater A B returns whether A > B +version_greater() { + [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] +} + +# return true if specified directory is empty +directory_empty() { + [ -z "$(ls -A "$1/")" ] +} + +run_as() { + if [ "$(id -u)" = 0 ]; then + su -p "$user" -s /bin/sh -c "$1" + else + sh -c "$1" + fi +} + +# Execute all executable files in a given directory in alphanumeric order +run_path() { + local hook_folder_path="/docker-entrypoint-hooks.d/$1" + local return_code=0 + + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" + return 0 + fi + + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + + ( + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" + continue + fi + + echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" + + run_as "${script_file_path}" || return_code="$?" + + if [ "${return_code}" -ne "0" ]; then + echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" + exit 1 + fi + + echo "==> Finished the script: \"${script_file_path}\"" + done + ) +} + +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' +# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of +# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") + local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") + if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then + echo >&2 "error: both $var and $fileVar are set (but are exclusive)" + exit 1 + fi + if [ -n "${varValue}" ]; then + export "$var"="${varValue}" + elif [ -n "${fileVarValue}" ]; then + export "$var"="$(cat "${fileVarValue}")" + elif [ -n "${def}" ]; then + export "$var"="$def" + fi + unset "$fileVar" +} + +if expr "$1" : "apache" 1>/dev/null; then + if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then + a2disconf remoteip + fi +fi + +if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + uid="$(id -u)" + gid="$(id -g)" + if [ "$uid" = '0' ]; then + case "$1" in + apache2*) + user="${APACHE_RUN_USER:-www-data}" + group="${APACHE_RUN_GROUP:-www-data}" + + # strip off any '#' symbol ('#1000' is valid syntax for Apache) + user="${user#'#'}" + group="${group#'#'}" + ;; + *) # php-fpm + user='www-data' + group='www-data' + ;; + esac + else + user="$uid" + group="$gid" + fi + + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + file_env REDIS_HOST_PASSWORD + echo 'session.save_handler = redis' + # check if redis host is an unix socket path + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then + if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then + echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" + else + echo "session.save_path = \"unix://${REDIS_HOST}\"" + 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}\"" + else + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + 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. + ( + if ! flock -n 9; then + # If we couldn't get it immediately, show a message, then wait for real + echo "Another process is initializing Nextcloud. Waiting..." + flock 9 + fi + + installed_version="0.0.0.0" + if [ -f /var/www/html/version.php ]; then + # shellcheck disable=SC2016 + installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" + fi + # shellcheck disable=SC2016 + image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" + + if version_greater "$installed_version" "$image_version"; then + echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" + exit 1 + fi + + if version_greater "$image_version" "$installed_version"; then + echo "Initializing nextcloud $image_version ..." + if [ "$installed_version" != "0.0.0.0" ]; then + if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then + echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." + echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." + exit 1 + fi + echo "Upgrading nextcloud from $installed_version ..." + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before + fi + if [ "$(id -u)" = 0 ]; then + rsync_options="-rlDog --chown $user:$group" + else + rsync_options="-rlD" + fi + + rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ + for dir in config data custom_apps themes; do + if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then + rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + fi + done + rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + + # Install + if [ "$installed_version" = "0.0.0.0" ]; then + echo "New nextcloud instance" + + file_env NEXTCLOUD_ADMIN_PASSWORD + file_env NEXTCLOUD_ADMIN_USER + + if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then + # shellcheck disable=SC2016 + install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' + if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then + # shellcheck disable=SC2016 + install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' + fi + + file_env MYSQL_DATABASE + file_env MYSQL_PASSWORD + file_env MYSQL_USER + file_env POSTGRES_DB + file_env POSTGRES_PASSWORD + file_env POSTGRES_USER + + install=false + if [ -n "${SQLITE_DATABASE+x}" ]; then + echo "Installing with SQLite database" + # shellcheck disable=SC2016 + install_options=$install_options' --database-name "$SQLITE_DATABASE"' + install=true + elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then + echo "Installing with MySQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' + install=true + elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then + echo "Installing with PostgreSQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' + install=true + fi + + if [ "$install" = true ]; then + run_path pre-installation + + echo "Starting nextcloud installation" + max_retries=10 + try=0 + until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + do + echo "Retrying install..." + try=$((try+1)) + sleep 10s + done + if [ "$try" -gt "$max_retries" ]; then + echo "Installing of nextcloud failed!" + exit 1 + fi + if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then + echo "Setting trusted domains…" + NC_TRUSTED_DOMAIN_IDX=1 + for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do + DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" + NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) + done + fi + + run_path post-installation + else + echo "Please run the web-based installer on first connect!" + fi + fi + # Upgrade + else + run_path pre-upgrade + + run_as 'php /var/www/html/occ upgrade' + + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after + echo "The following apps have been disabled:" + diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 + rm -f /tmp/list_before /tmp/list_after + + run_path post-upgrade + fi + + echo "Initializing finished" + fi + + # Update htaccess after init if requested + if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then + run_as 'php /var/www/html/occ maintenance:update:htaccess' + fi + ) 9> /var/www/html/nextcloud-init-sync.lock + + run_path before-starting +fi + +exec "$@" diff --git a/29/fpm/upgrade.exclude b/29/fpm/upgrade.exclude new file mode 100644 index 00000000..31ce39a8 --- /dev/null +++ b/29/fpm/upgrade.exclude @@ -0,0 +1,6 @@ +/config/ +/data/ +/custom_apps/ +/themes/ +/version.php +/nextcloud-init-sync.lock diff --git a/latest.txt b/latest.txt index 3ef31d3d..f1e4903d 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -28.0.4 +29.0.0 diff --git a/versions.json b/versions.json index f3a0fa1b..752a7b07 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,30 @@ { + "29": { + "branch": "29", + "version": "29.0.0", + "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.0.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.0.tar.bz2.asc", + "variants": { + "apache": { + "variant": "apache", + "base": "debian", + "baseVersion": "bookworm", + "phpVersion": "8.2" + }, + "fpm": { + "variant": "fpm", + "base": "debian", + "baseVersion": "bookworm", + "phpVersion": "8.2" + }, + "fpm-alpine": { + "variant": "fpm-alpine", + "base": "alpine", + "baseVersion": "3.19", + "phpVersion": "8.2" + } + } + }, "28": { "branch": "28", "version": "28.0.4", From 1be53d4bee21b5399d1fd049afd565ba18b025f5 Mon Sep 17 00:00:00 2001 From: J0WI Date: Wed, 24 Apr 2024 20:53:02 +0000 Subject: [PATCH 048/123] Drop Nextcloud 26 Signed-off-by: J0WI --- update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.sh b/update.sh index bea95729..015cf9ae 100755 --- a/update.sh +++ b/update.sh @@ -84,7 +84,7 @@ variants=( fpm-alpine ) -min_version='26' +min_version='27' # version_greater_or_equal A B returns whether A >= B function version_greater_or_equal() { From 473af1bed11c84866b31e2d5ebc39bc87070b758 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Wed, 24 Apr 2024 20:53:16 +0000 Subject: [PATCH 049/123] Runs update.sh --- versions.json | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/versions.json b/versions.json index 752a7b07..dd4390dc 100644 --- a/versions.json +++ b/versions.json @@ -76,31 +76,5 @@ "phpVersion": "8.2" } } - }, - "26": { - "branch": "26", - "version": "26.0.13", - "url": "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.tar.bz2.asc", - "variants": { - "apache": { - "variant": "apache", - "base": "debian", - "baseVersion": "bookworm", - "phpVersion": "8.2" - }, - "fpm": { - "variant": "fpm", - "base": "debian", - "baseVersion": "bookworm", - "phpVersion": "8.2" - }, - "fpm-alpine": { - "variant": "fpm-alpine", - "base": "alpine", - "baseVersion": "3.19", - "phpVersion": "8.2" - } - } } } From 1741b47319b4b002671d1a2078444a03411a75c7 Mon Sep 17 00:00:00 2001 From: J0WI Date: Thu, 25 Apr 2024 23:42:04 +0000 Subject: [PATCH 050/123] Remove 26 (#2205) --- 26/apache/Dockerfile | 174 ----------- .../config/apache-pretty-urls.config.php | 4 - 26/apache/config/apcu.config.php | 4 - 26/apache/config/apps.config.php | 15 - 26/apache/config/autoconfig.php | 41 --- 26/apache/config/redis.config.php | 17 -- 26/apache/config/reverse-proxy.config.php | 30 -- 26/apache/config/s3.config.php | 48 --- 26/apache/config/smtp.config.php | 22 -- 26/apache/config/swift.config.php | 31 -- .../config/upgrade-disable-web.config.php | 4 - 26/apache/cron.sh | 4 - 26/apache/entrypoint.sh | 279 ------------------ 26/apache/upgrade.exclude | 6 - 26/fpm-alpine/Dockerfile | 143 --------- 26/fpm-alpine/config/apcu.config.php | 4 - 26/fpm-alpine/config/apps.config.php | 15 - 26/fpm-alpine/config/autoconfig.php | 41 --- 26/fpm-alpine/config/redis.config.php | 17 -- 26/fpm-alpine/config/reverse-proxy.config.php | 30 -- 26/fpm-alpine/config/s3.config.php | 48 --- 26/fpm-alpine/config/smtp.config.php | 22 -- 26/fpm-alpine/config/swift.config.php | 31 -- .../config/upgrade-disable-web.config.php | 4 - 26/fpm-alpine/cron.sh | 4 - 26/fpm-alpine/entrypoint.sh | 279 ------------------ 26/fpm-alpine/upgrade.exclude | 6 - 26/fpm/Dockerfile | 159 ---------- 26/fpm/config/apcu.config.php | 4 - 26/fpm/config/apps.config.php | 15 - 26/fpm/config/autoconfig.php | 41 --- 26/fpm/config/redis.config.php | 17 -- 26/fpm/config/reverse-proxy.config.php | 30 -- 26/fpm/config/s3.config.php | 48 --- 26/fpm/config/smtp.config.php | 22 -- 26/fpm/config/swift.config.php | 31 -- 26/fpm/config/upgrade-disable-web.config.php | 4 - 26/fpm/cron.sh | 4 - 26/fpm/entrypoint.sh | 279 ------------------ 26/fpm/upgrade.exclude | 6 - 40 files changed, 1983 deletions(-) delete mode 100644 26/apache/Dockerfile delete mode 100644 26/apache/config/apache-pretty-urls.config.php delete mode 100644 26/apache/config/apcu.config.php delete mode 100644 26/apache/config/apps.config.php delete mode 100644 26/apache/config/autoconfig.php delete mode 100644 26/apache/config/redis.config.php delete mode 100644 26/apache/config/reverse-proxy.config.php delete mode 100644 26/apache/config/s3.config.php delete mode 100644 26/apache/config/smtp.config.php delete mode 100644 26/apache/config/swift.config.php delete mode 100644 26/apache/config/upgrade-disable-web.config.php delete mode 100755 26/apache/cron.sh delete mode 100755 26/apache/entrypoint.sh delete mode 100644 26/apache/upgrade.exclude delete mode 100644 26/fpm-alpine/Dockerfile delete mode 100644 26/fpm-alpine/config/apcu.config.php delete mode 100644 26/fpm-alpine/config/apps.config.php delete mode 100644 26/fpm-alpine/config/autoconfig.php delete mode 100644 26/fpm-alpine/config/redis.config.php delete mode 100644 26/fpm-alpine/config/reverse-proxy.config.php delete mode 100644 26/fpm-alpine/config/s3.config.php delete mode 100644 26/fpm-alpine/config/smtp.config.php delete mode 100644 26/fpm-alpine/config/swift.config.php delete mode 100644 26/fpm-alpine/config/upgrade-disable-web.config.php delete mode 100755 26/fpm-alpine/cron.sh delete mode 100755 26/fpm-alpine/entrypoint.sh delete mode 100644 26/fpm-alpine/upgrade.exclude delete mode 100644 26/fpm/Dockerfile delete mode 100644 26/fpm/config/apcu.config.php delete mode 100644 26/fpm/config/apps.config.php delete mode 100644 26/fpm/config/autoconfig.php delete mode 100644 26/fpm/config/redis.config.php delete mode 100644 26/fpm/config/reverse-proxy.config.php delete mode 100644 26/fpm/config/s3.config.php delete mode 100644 26/fpm/config/smtp.config.php delete mode 100644 26/fpm/config/swift.config.php delete mode 100644 26/fpm/config/upgrade-disable-web.config.php delete mode 100755 26/fpm/cron.sh delete mode 100755 26/fpm/entrypoint.sh delete mode 100644 26/fpm/upgrade.exclude diff --git a/26/apache/Dockerfile b/26/apache/Dockerfile deleted file mode 100644 index 95585626..00000000 --- a/26/apache/Dockerfile +++ /dev/null @@ -1,174 +0,0 @@ -# DO NOT EDIT: created by update.sh from Dockerfile-debian.template -FROM php:8.2-apache-bookworm - -# entrypoint.sh and cron.sh dependencies -RUN set -ex; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - busybox-static \ - bzip2 \ - libldap-common \ - libmagickcore-6.q16-6-extra \ - rsync \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - mkdir -p /var/spool/cron/crontabs; \ - echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data - -# install the PHP extensions we need -# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html -ENV PHP_MEMORY_LIMIT 512M -ENV PHP_UPLOAD_LIMIT 512M -RUN set -ex; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - libcurl4-openssl-dev \ - libevent-dev \ - libfreetype6-dev \ - libgmp-dev \ - libicu-dev \ - libjpeg-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libpq-dev \ - libwebp-dev \ - libxml2-dev \ - libzip-dev \ - ; \ - \ - debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ - docker-php-ext-configure ftp --with-openssl-dir=/usr; \ - docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ - docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ - docker-php-ext-install -j "$(nproc)" \ - bcmath \ - exif \ - ftp \ - gd \ - gmp \ - intl \ - ldap \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - sysvsem \ - zip \ - ; \ - \ -# pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ - pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ - \ - docker-php-ext-enable \ - apcu \ - imagick \ - memcached \ - redis \ - ; \ - rm -r /tmp/pear; \ - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark; \ - ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -rt apt-mark manual; \ - \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/* - -# set recommended PHP.ini settings -# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache -RUN { \ - echo 'opcache.enable=1'; \ - echo 'opcache.interned_strings_buffer=32'; \ - echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.save_comments=1'; \ - echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.jit=1255'; \ - echo 'opcache.jit_buffer_size=128M'; \ - } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ - \ - echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ - \ - { \ - echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ - echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ - echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ - \ - mkdir /var/www/data; \ - mkdir -p /docker-entrypoint-hooks.d/pre-installation \ - /docker-entrypoint-hooks.d/post-installation \ - /docker-entrypoint-hooks.d/pre-upgrade \ - /docker-entrypoint-hooks.d/post-upgrade \ - /docker-entrypoint-hooks.d/before-starting; \ - chown -R www-data:root /var/www; \ - chmod -R g=u /var/www - -VOLUME /var/www/html - -RUN a2enmod headers rewrite remoteip ; \ - { \ - echo 'RemoteIPHeader X-Real-IP'; \ - echo 'RemoteIPInternalProxy 10.0.0.0/8'; \ - echo 'RemoteIPInternalProxy 172.16.0.0/12'; \ - echo 'RemoteIPInternalProxy 192.168.0.0/16'; \ - } > /etc/apache2/conf-available/remoteip.conf; \ - a2enconf remoteip - -# set apache config LimitRequestBody -ENV APACHE_BODY_LIMIT 1073741824 -RUN { \ - echo 'LimitRequestBody ${APACHE_BODY_LIMIT}'; \ - } > /etc/apache2/conf-available/apache-limits.conf; \ - a2enconf apache-limits - -ENV NEXTCLOUD_VERSION 26.0.13 - -RUN set -ex; \ - fetchDeps=" \ - gnupg \ - dirmngr \ - "; \ - apt-get update; \ - apt-get install -y --no-install-recommends $fetchDeps; \ - \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.tar.bz2.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ -# gpg key from https://nextcloud.com/nextcloud.asc - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ - gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ - gpgconf --kill all; \ - rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ - mkdir -p /usr/src/nextcloud/data; \ - 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; \ - rm -rf /var/lib/apt/lists/* - -COPY *.sh upgrade.exclude / -COPY config/* /usr/src/nextcloud/config/ - -ENTRYPOINT ["/entrypoint.sh"] -CMD ["apache2-foreground"] diff --git a/26/apache/config/apache-pretty-urls.config.php b/26/apache/config/apache-pretty-urls.config.php deleted file mode 100644 index 72da1d8c..00000000 --- a/26/apache/config/apache-pretty-urls.config.php +++ /dev/null @@ -1,4 +0,0 @@ - '/', -); diff --git a/26/apache/config/apcu.config.php b/26/apache/config/apcu.config.php deleted file mode 100644 index 69fed876..00000000 --- a/26/apache/config/apcu.config.php +++ /dev/null @@ -1,4 +0,0 @@ - '\OC\Memcache\APCu', -); diff --git a/26/apache/config/apps.config.php b/26/apache/config/apps.config.php deleted file mode 100644 index 4c37f72a..00000000 --- a/26/apache/config/apps.config.php +++ /dev/null @@ -1,15 +0,0 @@ - array ( - 0 => array ( - 'path' => OC::$SERVERROOT.'/apps', - 'url' => '/apps', - 'writable' => false, - ), - 1 => array ( - 'path' => OC::$SERVERROOT.'/custom_apps', - 'url' => '/custom_apps', - 'writable' => true, - ), - ), -); diff --git a/26/apache/config/autoconfig.php b/26/apache/config/autoconfig.php deleted file mode 100644 index 92ad2a1c..00000000 --- a/26/apache/config/autoconfig.php +++ /dev/null @@ -1,41 +0,0 @@ - '\OC\Memcache\Redis', - 'memcache.locking' => '\OC\Memcache\Redis', - 'redis' => array( - 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), - ), - ); - - if (getenv('REDIS_HOST_PORT') !== false) { - $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); - } elseif (getenv('REDIS_HOST')[0] != '/') { - $CONFIG['redis']['port'] = 6379; - } -} diff --git a/26/apache/config/reverse-proxy.config.php b/26/apache/config/reverse-proxy.config.php deleted file mode 100644 index 7df0415e..00000000 --- a/26/apache/config/reverse-proxy.config.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'class' => '\OC\Files\ObjectStore\S3', - 'arguments' => array( - 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), - 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', - 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', - 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', - 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', - 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, - // required for some non Amazon S3 implementations - 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', - // required for older protocol versions - 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' - ) - ) - ); - - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { - $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_KEY')) { - $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); - } else { - $CONFIG['objectstore']['arguments']['key'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { - $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SECRET')) { - $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); - } else { - $CONFIG['objectstore']['arguments']['secret'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { - $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { - $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); - } -} diff --git a/26/apache/config/smtp.config.php b/26/apache/config/smtp.config.php deleted file mode 100644 index 5006fe47..00000000 --- a/26/apache/config/smtp.config.php +++ /dev/null @@ -1,22 +0,0 @@ - 'smtp', - 'mail_smtphost' => getenv('SMTP_HOST'), - 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), - 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), - 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', - 'mail_smtpname' => getenv('SMTP_NAME') ?: '', - 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), - 'mail_domain' => getenv('MAIL_DOMAIN'), - ); - - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { - $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); - } elseif (getenv('SMTP_PASSWORD')) { - $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); - } else { - $CONFIG['mail_smtppassword'] = ''; - } -} diff --git a/26/apache/config/swift.config.php b/26/apache/config/swift.config.php deleted file mode 100644 index 47ada566..00000000 --- a/26/apache/config/swift.config.php +++ /dev/null @@ -1,31 +0,0 @@ - [ - 'class' => 'OC\\Files\\ObjectStore\\Swift', - 'arguments' => [ - 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', - 'user' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), - 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', - ], - ], - 'scope' => [ - 'project' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', - ], - ], - ], - 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', - 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), - 'url' => getenv('OBJECTSTORE_SWIFT_URL'), - 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), - ] - ] - ); -} diff --git a/26/apache/config/upgrade-disable-web.config.php b/26/apache/config/upgrade-disable-web.config.php deleted file mode 100644 index cb00b436..00000000 --- a/26/apache/config/upgrade-disable-web.config.php +++ /dev/null @@ -1,4 +0,0 @@ - true, -); diff --git a/26/apache/cron.sh b/26/apache/cron.sh deleted file mode 100755 index b4cd9af6..00000000 --- a/26/apache/cron.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -exec busybox crond -f -L /dev/stdout diff --git a/26/apache/entrypoint.sh b/26/apache/entrypoint.sh deleted file mode 100755 index 5b627f07..00000000 --- a/26/apache/entrypoint.sh +++ /dev/null @@ -1,279 +0,0 @@ -#!/bin/sh -set -eu - -# version_greater A B returns whether A > B -version_greater() { - [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] -} - -# return true if specified directory is empty -directory_empty() { - [ -z "$(ls -A "$1/")" ] -} - -run_as() { - if [ "$(id -u)" = 0 ]; then - su -p "$user" -s /bin/sh -c "$1" - else - sh -c "$1" - fi -} - -# Execute all executable files in a given directory in alphanumeric order -run_path() { - local hook_folder_path="/docker-entrypoint-hooks.d/$1" - local return_code=0 - - if ! [ -d "${hook_folder_path}" ]; then - echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" - return 0 - fi - - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - ( - find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do - if ! [ -x "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" - continue - fi - - echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" - - run_as "${script_file_path}" || return_code="$?" - - if [ "${return_code}" -ne "0" ]; then - echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" - exit 1 - fi - - echo "==> Finished the script: \"${script_file_path}\"" - done - ) -} - -# usage: file_env VAR [DEFAULT] -# ie: file_env 'XYZ_DB_PASSWORD' 'example' -# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of -# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) -file_env() { - local var="$1" - local fileVar="${var}_FILE" - local def="${2:-}" - local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") - local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") - if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then - echo >&2 "error: both $var and $fileVar are set (but are exclusive)" - exit 1 - fi - if [ -n "${varValue}" ]; then - export "$var"="${varValue}" - elif [ -n "${fileVarValue}" ]; then - export "$var"="$(cat "${fileVarValue}")" - elif [ -n "${def}" ]; then - export "$var"="$def" - fi - unset "$fileVar" -} - -if expr "$1" : "apache" 1>/dev/null; then - if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then - a2disconf remoteip - fi -fi - -if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then - uid="$(id -u)" - gid="$(id -g)" - if [ "$uid" = '0' ]; then - case "$1" in - apache2*) - user="${APACHE_RUN_USER:-www-data}" - group="${APACHE_RUN_GROUP:-www-data}" - - # strip off any '#' symbol ('#1000' is valid syntax for Apache) - user="${user#'#'}" - group="${group#'#'}" - ;; - *) # php-fpm - user='www-data' - group='www-data' - ;; - esac - else - user="$uid" - group="$gid" - fi - - if [ -n "${REDIS_HOST+x}" ]; then - - echo "Configuring Redis as session handler" - { - file_env REDIS_HOST_PASSWORD - echo 'session.save_handler = redis' - # check if redis host is an unix socket path - if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then - if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" - else - echo "session.save_path = \"unix://${REDIS_HOST}\"" - 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}\"" - else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" - 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. - ( - if ! flock -n 9; then - # If we couldn't get it immediately, show a message, then wait for real - echo "Another process is initializing Nextcloud. Waiting..." - flock 9 - fi - - installed_version="0.0.0.0" - if [ -f /var/www/html/version.php ]; then - # shellcheck disable=SC2016 - installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" - fi - # shellcheck disable=SC2016 - image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" - - if version_greater "$installed_version" "$image_version"; then - echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" - exit 1 - fi - - if version_greater "$image_version" "$installed_version"; then - echo "Initializing nextcloud $image_version ..." - if [ "$installed_version" != "0.0.0.0" ]; then - if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then - echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." - echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." - exit 1 - fi - echo "Upgrading nextcloud from $installed_version ..." - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before - fi - if [ "$(id -u)" = 0 ]; then - rsync_options="-rlDog --chown $user:$group" - else - rsync_options="-rlD" - fi - - rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ - for dir in config data custom_apps themes; do - if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then - rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - fi - done - rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - - # Install - if [ "$installed_version" = "0.0.0.0" ]; then - echo "New nextcloud instance" - - file_env NEXTCLOUD_ADMIN_PASSWORD - file_env NEXTCLOUD_ADMIN_USER - - if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then - # shellcheck disable=SC2016 - install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' - if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then - # shellcheck disable=SC2016 - install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' - fi - - file_env MYSQL_DATABASE - file_env MYSQL_PASSWORD - file_env MYSQL_USER - file_env POSTGRES_DB - file_env POSTGRES_PASSWORD - file_env POSTGRES_USER - - install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then - echo "Installing with SQLite database" - # shellcheck disable=SC2016 - install_options=$install_options' --database-name "$SQLITE_DATABASE"' - install=true - elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then - echo "Installing with MySQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' - install=true - elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then - echo "Installing with PostgreSQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' - install=true - fi - - if [ "$install" = true ]; then - run_path pre-installation - - echo "Starting nextcloud installation" - max_retries=10 - try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] - do - echo "Retrying install..." - try=$((try+1)) - sleep 10s - done - if [ "$try" -gt "$max_retries" ]; then - echo "Installing of nextcloud failed!" - exit 1 - fi - if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then - echo "Setting trusted domains…" - NC_TRUSTED_DOMAIN_IDX=1 - for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do - DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') - run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" - NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) - done - fi - - run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi - fi - # Upgrade - else - run_path pre-upgrade - - run_as 'php /var/www/html/occ upgrade' - - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after - echo "The following apps have been disabled:" - diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 - rm -f /tmp/list_before /tmp/list_after - - run_path post-upgrade - fi - - echo "Initializing finished" - fi - - # Update htaccess after init if requested - if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then - run_as 'php /var/www/html/occ maintenance:update:htaccess' - fi - ) 9> /var/www/html/nextcloud-init-sync.lock - - run_path before-starting -fi - -exec "$@" diff --git a/26/apache/upgrade.exclude b/26/apache/upgrade.exclude deleted file mode 100644 index 31ce39a8..00000000 --- a/26/apache/upgrade.exclude +++ /dev/null @@ -1,6 +0,0 @@ -/config/ -/data/ -/custom_apps/ -/themes/ -/version.php -/nextcloud-init-sync.lock diff --git a/26/fpm-alpine/Dockerfile b/26/fpm-alpine/Dockerfile deleted file mode 100644 index fe9c75f8..00000000 --- a/26/fpm-alpine/Dockerfile +++ /dev/null @@ -1,143 +0,0 @@ -# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template -FROM php:8.2-fpm-alpine3.19 - -# entrypoint.sh and cron.sh dependencies -RUN set -ex; \ - \ - apk add --no-cache \ - imagemagick \ - rsync \ - ; \ - \ - rm /var/spool/cron/crontabs/root; \ - echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data - -# install the PHP extensions we need -# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html -RUN set -ex; \ - \ - apk add --no-cache --virtual .build-deps \ - $PHPIZE_DEPS \ - autoconf \ - freetype-dev \ - gmp-dev \ - icu-dev \ - imagemagick-dev \ - libevent-dev \ - libjpeg-turbo-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libwebp-dev \ - libxml2-dev \ - libzip-dev \ - openldap-dev \ - pcre-dev \ - postgresql-dev \ - ; \ - \ - docker-php-ext-configure ftp --with-openssl-dir=/usr; \ - docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ - docker-php-ext-configure ldap; \ - docker-php-ext-install -j "$(nproc)" \ - bcmath \ - exif \ - ftp \ - gd \ - gmp \ - intl \ - ldap \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - sysvsem \ - zip \ - ; \ - \ -# pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ - pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ - \ - docker-php-ext-enable \ - apcu \ - imagick \ - memcached \ - redis \ - ; \ - rm -r /tmp/pear; \ - \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .nextcloud-phpext-rundeps $runDeps; \ - apk del --no-network .build-deps - -# set recommended PHP.ini settings -# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache -ENV PHP_MEMORY_LIMIT 512M -ENV PHP_UPLOAD_LIMIT 512M -RUN { \ - echo 'opcache.enable=1'; \ - echo 'opcache.interned_strings_buffer=32'; \ - echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.save_comments=1'; \ - echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.jit=1255'; \ - echo 'opcache.jit_buffer_size=128M'; \ - } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ - \ - echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ - \ - { \ - echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ - echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ - echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ - \ - mkdir /var/www/data; \ - mkdir -p /docker-entrypoint-hooks.d/pre-installation \ - /docker-entrypoint-hooks.d/post-installation \ - /docker-entrypoint-hooks.d/pre-upgrade \ - /docker-entrypoint-hooks.d/post-upgrade \ - /docker-entrypoint-hooks.d/before-starting; \ - chown -R www-data:root /var/www; \ - chmod -R g=u /var/www - -VOLUME /var/www/html - - -ENV NEXTCLOUD_VERSION 26.0.13 - -RUN set -ex; \ - apk add --no-cache --virtual .fetch-deps \ - bzip2 \ - gnupg \ - ; \ - \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.tar.bz2.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ -# gpg key from https://nextcloud.com/nextcloud.asc - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ - gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ - gpgconf --kill all; \ - rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ - mkdir -p /usr/src/nextcloud/data; \ - mkdir -p /usr/src/nextcloud/custom_apps; \ - chmod +x /usr/src/nextcloud/occ; \ - apk del --no-network .fetch-deps - -COPY *.sh upgrade.exclude / -COPY config/* /usr/src/nextcloud/config/ - -ENTRYPOINT ["/entrypoint.sh"] -CMD ["php-fpm"] diff --git a/26/fpm-alpine/config/apcu.config.php b/26/fpm-alpine/config/apcu.config.php deleted file mode 100644 index 69fed876..00000000 --- a/26/fpm-alpine/config/apcu.config.php +++ /dev/null @@ -1,4 +0,0 @@ - '\OC\Memcache\APCu', -); diff --git a/26/fpm-alpine/config/apps.config.php b/26/fpm-alpine/config/apps.config.php deleted file mode 100644 index 4c37f72a..00000000 --- a/26/fpm-alpine/config/apps.config.php +++ /dev/null @@ -1,15 +0,0 @@ - array ( - 0 => array ( - 'path' => OC::$SERVERROOT.'/apps', - 'url' => '/apps', - 'writable' => false, - ), - 1 => array ( - 'path' => OC::$SERVERROOT.'/custom_apps', - 'url' => '/custom_apps', - 'writable' => true, - ), - ), -); diff --git a/26/fpm-alpine/config/autoconfig.php b/26/fpm-alpine/config/autoconfig.php deleted file mode 100644 index 92ad2a1c..00000000 --- a/26/fpm-alpine/config/autoconfig.php +++ /dev/null @@ -1,41 +0,0 @@ - '\OC\Memcache\Redis', - 'memcache.locking' => '\OC\Memcache\Redis', - 'redis' => array( - 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), - ), - ); - - if (getenv('REDIS_HOST_PORT') !== false) { - $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); - } elseif (getenv('REDIS_HOST')[0] != '/') { - $CONFIG['redis']['port'] = 6379; - } -} diff --git a/26/fpm-alpine/config/reverse-proxy.config.php b/26/fpm-alpine/config/reverse-proxy.config.php deleted file mode 100644 index 7df0415e..00000000 --- a/26/fpm-alpine/config/reverse-proxy.config.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'class' => '\OC\Files\ObjectStore\S3', - 'arguments' => array( - 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), - 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', - 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', - 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', - 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', - 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, - // required for some non Amazon S3 implementations - 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', - // required for older protocol versions - 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' - ) - ) - ); - - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { - $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_KEY')) { - $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); - } else { - $CONFIG['objectstore']['arguments']['key'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { - $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SECRET')) { - $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); - } else { - $CONFIG['objectstore']['arguments']['secret'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { - $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { - $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); - } -} diff --git a/26/fpm-alpine/config/smtp.config.php b/26/fpm-alpine/config/smtp.config.php deleted file mode 100644 index 5006fe47..00000000 --- a/26/fpm-alpine/config/smtp.config.php +++ /dev/null @@ -1,22 +0,0 @@ - 'smtp', - 'mail_smtphost' => getenv('SMTP_HOST'), - 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), - 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), - 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', - 'mail_smtpname' => getenv('SMTP_NAME') ?: '', - 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), - 'mail_domain' => getenv('MAIL_DOMAIN'), - ); - - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { - $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); - } elseif (getenv('SMTP_PASSWORD')) { - $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); - } else { - $CONFIG['mail_smtppassword'] = ''; - } -} diff --git a/26/fpm-alpine/config/swift.config.php b/26/fpm-alpine/config/swift.config.php deleted file mode 100644 index 47ada566..00000000 --- a/26/fpm-alpine/config/swift.config.php +++ /dev/null @@ -1,31 +0,0 @@ - [ - 'class' => 'OC\\Files\\ObjectStore\\Swift', - 'arguments' => [ - 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', - 'user' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), - 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', - ], - ], - 'scope' => [ - 'project' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', - ], - ], - ], - 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', - 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), - 'url' => getenv('OBJECTSTORE_SWIFT_URL'), - 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), - ] - ] - ); -} diff --git a/26/fpm-alpine/config/upgrade-disable-web.config.php b/26/fpm-alpine/config/upgrade-disable-web.config.php deleted file mode 100644 index cb00b436..00000000 --- a/26/fpm-alpine/config/upgrade-disable-web.config.php +++ /dev/null @@ -1,4 +0,0 @@ - true, -); diff --git a/26/fpm-alpine/cron.sh b/26/fpm-alpine/cron.sh deleted file mode 100755 index b4cd9af6..00000000 --- a/26/fpm-alpine/cron.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -exec busybox crond -f -L /dev/stdout diff --git a/26/fpm-alpine/entrypoint.sh b/26/fpm-alpine/entrypoint.sh deleted file mode 100755 index 5b627f07..00000000 --- a/26/fpm-alpine/entrypoint.sh +++ /dev/null @@ -1,279 +0,0 @@ -#!/bin/sh -set -eu - -# version_greater A B returns whether A > B -version_greater() { - [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] -} - -# return true if specified directory is empty -directory_empty() { - [ -z "$(ls -A "$1/")" ] -} - -run_as() { - if [ "$(id -u)" = 0 ]; then - su -p "$user" -s /bin/sh -c "$1" - else - sh -c "$1" - fi -} - -# Execute all executable files in a given directory in alphanumeric order -run_path() { - local hook_folder_path="/docker-entrypoint-hooks.d/$1" - local return_code=0 - - if ! [ -d "${hook_folder_path}" ]; then - echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" - return 0 - fi - - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - ( - find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do - if ! [ -x "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" - continue - fi - - echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" - - run_as "${script_file_path}" || return_code="$?" - - if [ "${return_code}" -ne "0" ]; then - echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" - exit 1 - fi - - echo "==> Finished the script: \"${script_file_path}\"" - done - ) -} - -# usage: file_env VAR [DEFAULT] -# ie: file_env 'XYZ_DB_PASSWORD' 'example' -# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of -# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) -file_env() { - local var="$1" - local fileVar="${var}_FILE" - local def="${2:-}" - local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") - local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") - if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then - echo >&2 "error: both $var and $fileVar are set (but are exclusive)" - exit 1 - fi - if [ -n "${varValue}" ]; then - export "$var"="${varValue}" - elif [ -n "${fileVarValue}" ]; then - export "$var"="$(cat "${fileVarValue}")" - elif [ -n "${def}" ]; then - export "$var"="$def" - fi - unset "$fileVar" -} - -if expr "$1" : "apache" 1>/dev/null; then - if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then - a2disconf remoteip - fi -fi - -if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then - uid="$(id -u)" - gid="$(id -g)" - if [ "$uid" = '0' ]; then - case "$1" in - apache2*) - user="${APACHE_RUN_USER:-www-data}" - group="${APACHE_RUN_GROUP:-www-data}" - - # strip off any '#' symbol ('#1000' is valid syntax for Apache) - user="${user#'#'}" - group="${group#'#'}" - ;; - *) # php-fpm - user='www-data' - group='www-data' - ;; - esac - else - user="$uid" - group="$gid" - fi - - if [ -n "${REDIS_HOST+x}" ]; then - - echo "Configuring Redis as session handler" - { - file_env REDIS_HOST_PASSWORD - echo 'session.save_handler = redis' - # check if redis host is an unix socket path - if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then - if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" - else - echo "session.save_path = \"unix://${REDIS_HOST}\"" - 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}\"" - else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" - 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. - ( - if ! flock -n 9; then - # If we couldn't get it immediately, show a message, then wait for real - echo "Another process is initializing Nextcloud. Waiting..." - flock 9 - fi - - installed_version="0.0.0.0" - if [ -f /var/www/html/version.php ]; then - # shellcheck disable=SC2016 - installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" - fi - # shellcheck disable=SC2016 - image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" - - if version_greater "$installed_version" "$image_version"; then - echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" - exit 1 - fi - - if version_greater "$image_version" "$installed_version"; then - echo "Initializing nextcloud $image_version ..." - if [ "$installed_version" != "0.0.0.0" ]; then - if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then - echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." - echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." - exit 1 - fi - echo "Upgrading nextcloud from $installed_version ..." - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before - fi - if [ "$(id -u)" = 0 ]; then - rsync_options="-rlDog --chown $user:$group" - else - rsync_options="-rlD" - fi - - rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ - for dir in config data custom_apps themes; do - if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then - rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - fi - done - rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - - # Install - if [ "$installed_version" = "0.0.0.0" ]; then - echo "New nextcloud instance" - - file_env NEXTCLOUD_ADMIN_PASSWORD - file_env NEXTCLOUD_ADMIN_USER - - if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then - # shellcheck disable=SC2016 - install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' - if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then - # shellcheck disable=SC2016 - install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' - fi - - file_env MYSQL_DATABASE - file_env MYSQL_PASSWORD - file_env MYSQL_USER - file_env POSTGRES_DB - file_env POSTGRES_PASSWORD - file_env POSTGRES_USER - - install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then - echo "Installing with SQLite database" - # shellcheck disable=SC2016 - install_options=$install_options' --database-name "$SQLITE_DATABASE"' - install=true - elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then - echo "Installing with MySQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' - install=true - elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then - echo "Installing with PostgreSQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' - install=true - fi - - if [ "$install" = true ]; then - run_path pre-installation - - echo "Starting nextcloud installation" - max_retries=10 - try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] - do - echo "Retrying install..." - try=$((try+1)) - sleep 10s - done - if [ "$try" -gt "$max_retries" ]; then - echo "Installing of nextcloud failed!" - exit 1 - fi - if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then - echo "Setting trusted domains…" - NC_TRUSTED_DOMAIN_IDX=1 - for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do - DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') - run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" - NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) - done - fi - - run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi - fi - # Upgrade - else - run_path pre-upgrade - - run_as 'php /var/www/html/occ upgrade' - - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after - echo "The following apps have been disabled:" - diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 - rm -f /tmp/list_before /tmp/list_after - - run_path post-upgrade - fi - - echo "Initializing finished" - fi - - # Update htaccess after init if requested - if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then - run_as 'php /var/www/html/occ maintenance:update:htaccess' - fi - ) 9> /var/www/html/nextcloud-init-sync.lock - - run_path before-starting -fi - -exec "$@" diff --git a/26/fpm-alpine/upgrade.exclude b/26/fpm-alpine/upgrade.exclude deleted file mode 100644 index 31ce39a8..00000000 --- a/26/fpm-alpine/upgrade.exclude +++ /dev/null @@ -1,6 +0,0 @@ -/config/ -/data/ -/custom_apps/ -/themes/ -/version.php -/nextcloud-init-sync.lock diff --git a/26/fpm/Dockerfile b/26/fpm/Dockerfile deleted file mode 100644 index b74f1052..00000000 --- a/26/fpm/Dockerfile +++ /dev/null @@ -1,159 +0,0 @@ -# DO NOT EDIT: created by update.sh from Dockerfile-debian.template -FROM php:8.2-fpm-bookworm - -# entrypoint.sh and cron.sh dependencies -RUN set -ex; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - busybox-static \ - bzip2 \ - libldap-common \ - libmagickcore-6.q16-6-extra \ - rsync \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - mkdir -p /var/spool/cron/crontabs; \ - echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data - -# install the PHP extensions we need -# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html -ENV PHP_MEMORY_LIMIT 512M -ENV PHP_UPLOAD_LIMIT 512M -RUN set -ex; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - libcurl4-openssl-dev \ - libevent-dev \ - libfreetype6-dev \ - libgmp-dev \ - libicu-dev \ - libjpeg-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libpq-dev \ - libwebp-dev \ - libxml2-dev \ - libzip-dev \ - ; \ - \ - debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ - docker-php-ext-configure ftp --with-openssl-dir=/usr; \ - docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ - docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ - docker-php-ext-install -j "$(nproc)" \ - bcmath \ - exif \ - ftp \ - gd \ - gmp \ - intl \ - ldap \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - sysvsem \ - zip \ - ; \ - \ -# pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ - pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ - \ - docker-php-ext-enable \ - apcu \ - imagick \ - memcached \ - redis \ - ; \ - rm -r /tmp/pear; \ - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark; \ - ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -rt apt-mark manual; \ - \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/* - -# set recommended PHP.ini settings -# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache -RUN { \ - echo 'opcache.enable=1'; \ - echo 'opcache.interned_strings_buffer=32'; \ - echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.save_comments=1'; \ - echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.jit=1255'; \ - echo 'opcache.jit_buffer_size=128M'; \ - } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ - \ - echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ - \ - { \ - echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ - echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ - echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ - \ - mkdir /var/www/data; \ - mkdir -p /docker-entrypoint-hooks.d/pre-installation \ - /docker-entrypoint-hooks.d/post-installation \ - /docker-entrypoint-hooks.d/pre-upgrade \ - /docker-entrypoint-hooks.d/post-upgrade \ - /docker-entrypoint-hooks.d/before-starting; \ - chown -R www-data:root /var/www; \ - chmod -R g=u /var/www - -VOLUME /var/www/html - - -ENV NEXTCLOUD_VERSION 26.0.13 - -RUN set -ex; \ - fetchDeps=" \ - gnupg \ - dirmngr \ - "; \ - apt-get update; \ - apt-get install -y --no-install-recommends $fetchDeps; \ - \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-26.0.13.tar.bz2.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ -# gpg key from https://nextcloud.com/nextcloud.asc - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ - gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ - gpgconf --kill all; \ - rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ - mkdir -p /usr/src/nextcloud/data; \ - 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; \ - rm -rf /var/lib/apt/lists/* - -COPY *.sh upgrade.exclude / -COPY config/* /usr/src/nextcloud/config/ - -ENTRYPOINT ["/entrypoint.sh"] -CMD ["php-fpm"] diff --git a/26/fpm/config/apcu.config.php b/26/fpm/config/apcu.config.php deleted file mode 100644 index 69fed876..00000000 --- a/26/fpm/config/apcu.config.php +++ /dev/null @@ -1,4 +0,0 @@ - '\OC\Memcache\APCu', -); diff --git a/26/fpm/config/apps.config.php b/26/fpm/config/apps.config.php deleted file mode 100644 index 4c37f72a..00000000 --- a/26/fpm/config/apps.config.php +++ /dev/null @@ -1,15 +0,0 @@ - array ( - 0 => array ( - 'path' => OC::$SERVERROOT.'/apps', - 'url' => '/apps', - 'writable' => false, - ), - 1 => array ( - 'path' => OC::$SERVERROOT.'/custom_apps', - 'url' => '/custom_apps', - 'writable' => true, - ), - ), -); diff --git a/26/fpm/config/autoconfig.php b/26/fpm/config/autoconfig.php deleted file mode 100644 index 92ad2a1c..00000000 --- a/26/fpm/config/autoconfig.php +++ /dev/null @@ -1,41 +0,0 @@ - '\OC\Memcache\Redis', - 'memcache.locking' => '\OC\Memcache\Redis', - 'redis' => array( - 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), - ), - ); - - if (getenv('REDIS_HOST_PORT') !== false) { - $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); - } elseif (getenv('REDIS_HOST')[0] != '/') { - $CONFIG['redis']['port'] = 6379; - } -} diff --git a/26/fpm/config/reverse-proxy.config.php b/26/fpm/config/reverse-proxy.config.php deleted file mode 100644 index 7df0415e..00000000 --- a/26/fpm/config/reverse-proxy.config.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'class' => '\OC\Files\ObjectStore\S3', - 'arguments' => array( - 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), - 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', - 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', - 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', - 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', - 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, - // required for some non Amazon S3 implementations - 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', - // required for older protocol versions - 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' - ) - ) - ); - - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { - $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_KEY')) { - $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); - } else { - $CONFIG['objectstore']['arguments']['key'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { - $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SECRET')) { - $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); - } else { - $CONFIG['objectstore']['arguments']['secret'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { - $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { - $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); - } -} diff --git a/26/fpm/config/smtp.config.php b/26/fpm/config/smtp.config.php deleted file mode 100644 index 5006fe47..00000000 --- a/26/fpm/config/smtp.config.php +++ /dev/null @@ -1,22 +0,0 @@ - 'smtp', - 'mail_smtphost' => getenv('SMTP_HOST'), - 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), - 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), - 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', - 'mail_smtpname' => getenv('SMTP_NAME') ?: '', - 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), - 'mail_domain' => getenv('MAIL_DOMAIN'), - ); - - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { - $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); - } elseif (getenv('SMTP_PASSWORD')) { - $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); - } else { - $CONFIG['mail_smtppassword'] = ''; - } -} diff --git a/26/fpm/config/swift.config.php b/26/fpm/config/swift.config.php deleted file mode 100644 index 47ada566..00000000 --- a/26/fpm/config/swift.config.php +++ /dev/null @@ -1,31 +0,0 @@ - [ - 'class' => 'OC\\Files\\ObjectStore\\Swift', - 'arguments' => [ - 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', - 'user' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), - 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', - ], - ], - 'scope' => [ - 'project' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', - ], - ], - ], - 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', - 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), - 'url' => getenv('OBJECTSTORE_SWIFT_URL'), - 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), - ] - ] - ); -} diff --git a/26/fpm/config/upgrade-disable-web.config.php b/26/fpm/config/upgrade-disable-web.config.php deleted file mode 100644 index cb00b436..00000000 --- a/26/fpm/config/upgrade-disable-web.config.php +++ /dev/null @@ -1,4 +0,0 @@ - true, -); diff --git a/26/fpm/cron.sh b/26/fpm/cron.sh deleted file mode 100755 index b4cd9af6..00000000 --- a/26/fpm/cron.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -exec busybox crond -f -L /dev/stdout diff --git a/26/fpm/entrypoint.sh b/26/fpm/entrypoint.sh deleted file mode 100755 index 5b627f07..00000000 --- a/26/fpm/entrypoint.sh +++ /dev/null @@ -1,279 +0,0 @@ -#!/bin/sh -set -eu - -# version_greater A B returns whether A > B -version_greater() { - [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] -} - -# return true if specified directory is empty -directory_empty() { - [ -z "$(ls -A "$1/")" ] -} - -run_as() { - if [ "$(id -u)" = 0 ]; then - su -p "$user" -s /bin/sh -c "$1" - else - sh -c "$1" - fi -} - -# Execute all executable files in a given directory in alphanumeric order -run_path() { - local hook_folder_path="/docker-entrypoint-hooks.d/$1" - local return_code=0 - - if ! [ -d "${hook_folder_path}" ]; then - echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" - return 0 - fi - - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - ( - find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do - if ! [ -x "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" - continue - fi - - echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" - - run_as "${script_file_path}" || return_code="$?" - - if [ "${return_code}" -ne "0" ]; then - echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" - exit 1 - fi - - echo "==> Finished the script: \"${script_file_path}\"" - done - ) -} - -# usage: file_env VAR [DEFAULT] -# ie: file_env 'XYZ_DB_PASSWORD' 'example' -# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of -# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) -file_env() { - local var="$1" - local fileVar="${var}_FILE" - local def="${2:-}" - local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") - local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") - if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then - echo >&2 "error: both $var and $fileVar are set (but are exclusive)" - exit 1 - fi - if [ -n "${varValue}" ]; then - export "$var"="${varValue}" - elif [ -n "${fileVarValue}" ]; then - export "$var"="$(cat "${fileVarValue}")" - elif [ -n "${def}" ]; then - export "$var"="$def" - fi - unset "$fileVar" -} - -if expr "$1" : "apache" 1>/dev/null; then - if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then - a2disconf remoteip - fi -fi - -if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then - uid="$(id -u)" - gid="$(id -g)" - if [ "$uid" = '0' ]; then - case "$1" in - apache2*) - user="${APACHE_RUN_USER:-www-data}" - group="${APACHE_RUN_GROUP:-www-data}" - - # strip off any '#' symbol ('#1000' is valid syntax for Apache) - user="${user#'#'}" - group="${group#'#'}" - ;; - *) # php-fpm - user='www-data' - group='www-data' - ;; - esac - else - user="$uid" - group="$gid" - fi - - if [ -n "${REDIS_HOST+x}" ]; then - - echo "Configuring Redis as session handler" - { - file_env REDIS_HOST_PASSWORD - echo 'session.save_handler = redis' - # check if redis host is an unix socket path - if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then - if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" - else - echo "session.save_path = \"unix://${REDIS_HOST}\"" - 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}\"" - else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" - 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. - ( - if ! flock -n 9; then - # If we couldn't get it immediately, show a message, then wait for real - echo "Another process is initializing Nextcloud. Waiting..." - flock 9 - fi - - installed_version="0.0.0.0" - if [ -f /var/www/html/version.php ]; then - # shellcheck disable=SC2016 - installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" - fi - # shellcheck disable=SC2016 - image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" - - if version_greater "$installed_version" "$image_version"; then - echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" - exit 1 - fi - - if version_greater "$image_version" "$installed_version"; then - echo "Initializing nextcloud $image_version ..." - if [ "$installed_version" != "0.0.0.0" ]; then - if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then - echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." - echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." - exit 1 - fi - echo "Upgrading nextcloud from $installed_version ..." - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before - fi - if [ "$(id -u)" = 0 ]; then - rsync_options="-rlDog --chown $user:$group" - else - rsync_options="-rlD" - fi - - rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ - for dir in config data custom_apps themes; do - if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then - rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - fi - done - rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - - # Install - if [ "$installed_version" = "0.0.0.0" ]; then - echo "New nextcloud instance" - - file_env NEXTCLOUD_ADMIN_PASSWORD - file_env NEXTCLOUD_ADMIN_USER - - if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then - # shellcheck disable=SC2016 - install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' - if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then - # shellcheck disable=SC2016 - install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' - fi - - file_env MYSQL_DATABASE - file_env MYSQL_PASSWORD - file_env MYSQL_USER - file_env POSTGRES_DB - file_env POSTGRES_PASSWORD - file_env POSTGRES_USER - - install=false - if [ -n "${SQLITE_DATABASE+x}" ]; then - echo "Installing with SQLite database" - # shellcheck disable=SC2016 - install_options=$install_options' --database-name "$SQLITE_DATABASE"' - install=true - elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then - echo "Installing with MySQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' - install=true - elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then - echo "Installing with PostgreSQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' - install=true - fi - - if [ "$install" = true ]; then - run_path pre-installation - - echo "Starting nextcloud installation" - max_retries=10 - try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] - do - echo "Retrying install..." - try=$((try+1)) - sleep 10s - done - if [ "$try" -gt "$max_retries" ]; then - echo "Installing of nextcloud failed!" - exit 1 - fi - if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then - echo "Setting trusted domains…" - NC_TRUSTED_DOMAIN_IDX=1 - for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do - DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') - run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" - NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) - done - fi - - run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi - fi - # Upgrade - else - run_path pre-upgrade - - run_as 'php /var/www/html/occ upgrade' - - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after - echo "The following apps have been disabled:" - diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 - rm -f /tmp/list_before /tmp/list_after - - run_path post-upgrade - fi - - echo "Initializing finished" - fi - - # Update htaccess after init if requested - if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then - run_as 'php /var/www/html/occ maintenance:update:htaccess' - fi - ) 9> /var/www/html/nextcloud-init-sync.lock - - run_path before-starting -fi - -exec "$@" diff --git a/26/fpm/upgrade.exclude b/26/fpm/upgrade.exclude deleted file mode 100644 index 31ce39a8..00000000 --- a/26/fpm/upgrade.exclude +++ /dev/null @@ -1,6 +0,0 @@ -/config/ -/data/ -/custom_apps/ -/themes/ -/version.php -/nextcloud-init-sync.lock From 19417a8eb9b77b2613d64dc997def635d5bb4441 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Thu, 25 Apr 2024 23:42:16 +0000 Subject: [PATCH 051/123] Runs update.sh --- 27/apache/Dockerfile | 6 +++--- 27/fpm-alpine/Dockerfile | 6 +++--- 27/fpm/Dockerfile | 6 +++--- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/fpm/Dockerfile | 6 +++--- versions.json | 12 ++++++------ 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/27/apache/Dockerfile b/27/apache/Dockerfile index 853a3713..4e2f89c1 100644 --- a/27/apache/Dockerfile +++ b/27/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 27.1.8 +ENV NEXTCLOUD_VERSION 27.1.9 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-27.1.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.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/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index 04ba1dcf..e4b0e500 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -113,7 +113,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.8 +ENV NEXTCLOUD_VERSION 27.1.9 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -121,8 +121,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.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/27/fpm/Dockerfile b/27/fpm/Dockerfile index ade6aaa3..1e029cac 100644 --- a/27/fpm/Dockerfile +++ b/27/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.8 +ENV NEXTCLOUD_VERSION 27.1.9 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-27.1.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.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/28/apache/Dockerfile b/28/apache/Dockerfile index 8bd19340..90ae1b58 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.4 +ENV NEXTCLOUD_VERSION 28.0.5 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-28.0.4.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index c910afeb..6bbc9523 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -113,7 +113,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.4 +ENV NEXTCLOUD_VERSION 28.0.5 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -121,8 +121,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index ee9f27eb..e9c34bf7 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.4 +ENV NEXTCLOUD_VERSION 28.0.5 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-28.0.4.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.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/versions.json b/versions.json index dd4390dc..64bef572 100644 --- a/versions.json +++ b/versions.json @@ -27,9 +27,9 @@ }, "28": { "branch": "28", - "version": "28.0.4", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.4.tar.bz2.asc", + "version": "28.0.5", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -53,9 +53,9 @@ }, "27": { "branch": "27", - "version": "27.1.8", - "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.8.tar.bz2.asc", + "version": "27.1.9", + "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From ef382014777bc7d747792ab8d70b8ca162b25619 Mon Sep 17 00:00:00 2001 From: J0WI Date: Thu, 25 Apr 2024 23:55:07 +0000 Subject: [PATCH 052/123] Bump to 28.0.5 Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index b0bad02f..d84c6a26 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='28.0.4' +stable_channel='28.0.5' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From ba9a6c2d9382356a02013a0cd7d6a98ef3f41b43 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 6 May 2024 11:57:08 -0400 Subject: [PATCH 053/123] fix(README): Point help seekers to forum first Signed-off-by: Josh --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c73bbebf..4c69999b 100644 --- a/README.md +++ b/README.md @@ -602,5 +602,12 @@ You're already using Nextcloud and want to switch to docker? Great! Here are som docker-compose exec app chown -R www-data:www-data /var/www/html/custom_apps ``` -# Questions / Issues -If you got any questions or problems using the image, please visit our [Github Repository](https://github.com/nextcloud/docker) and write an issue. +# Help (Questions / Issues) + +**If you have any questions or problems while using the image, please ask for assistance on the Help Forum first (https://help.nextcloud.com)**. + +Also, most Nextcloud Server matters are covered in the [Nextcloud Admin Manual](https://docs.nextcloud.com/server/latest/admin_manual/) which is routinely updated. + +If you believe you've found a bug (or have an enhancement idea) in the image itself, please [search for already reported bugs and enhancement ideas](https://github.com/nextcloud/docker/issues). If there is an existing open issue, you can either add to the discussion there or upvote to indicate you're impacted by (or interested in) the same issue. If you believe you've found a new bug, please create a new Issue so that others can try to reproduce it and remediation can be tracked. + +Thanks for helping to make the Nextcloud community maintained micro-services image better! From 3b13c02caaaa229f7f3efa67c332765e17226bea Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Fri, 24 May 2024 00:27:40 +0000 Subject: [PATCH 054/123] Runs update.sh --- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/fpm/Dockerfile | 6 +++--- 29/apache/Dockerfile | 6 +++--- 29/fpm-alpine/Dockerfile | 6 +++--- 29/fpm/Dockerfile | 6 +++--- latest.txt | 2 +- versions.json | 12 ++++++------ 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile index 90ae1b58..e317d1d8 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.5 +ENV NEXTCLOUD_VERSION 28.0.6 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-28.0.5.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.6.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 6bbc9523..b7af26fc 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -113,7 +113,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.5 +ENV NEXTCLOUD_VERSION 28.0.6 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -121,8 +121,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.6.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index e9c34bf7..62015da4 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.5 +ENV NEXTCLOUD_VERSION 28.0.6 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-28.0.5.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.6.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.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/29/apache/Dockerfile b/29/apache/Dockerfile index eb44e77c..bd6e4682 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 29.0.0 +ENV NEXTCLOUD_VERSION 29.0.1 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.0.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.0.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.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 76a42bf1..0b15d62f 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -113,7 +113,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.0 +ENV NEXTCLOUD_VERSION 29.0.1 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -121,8 +121,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.0.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.0.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.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 6127a79b..2510c043 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.0 +ENV NEXTCLOUD_VERSION 29.0.1 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.0.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.0.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.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 f1e4903d..a67d7601 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -29.0.0 +29.0.1 diff --git a/versions.json b/versions.json index 64bef572..e6738f1d 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "29": { "branch": "29", - "version": "29.0.0", - "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.0.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.0.tar.bz2.asc", + "version": "29.0.1", + "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -27,9 +27,9 @@ }, "28": { "branch": "28", - "version": "28.0.5", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.5.tar.bz2.asc", + "version": "28.0.6", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.6.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.6.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From cb7acf5fe3aa56adac0a3747dd21b03897bfa215 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 30 May 2024 18:39:58 -0400 Subject: [PATCH 055/123] fix(examples): `libmagickcore-6.q16-6-extra` is already in the image Signed-off-by: Josh --- .examples/README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/.examples/README.md b/.examples/README.md index e962f67d..64b694b5 100644 --- a/.examples/README.md +++ b/.examples/README.md @@ -52,9 +52,6 @@ The required steps for each optional/recommended package that is not already in #### ffmpeg `apt install ffmpeg` -#### imagemagick SVG support -`apt install libmagickcore-6.q16-6-extra` - #### LibreOffice `apt install libreoffice` From a643e4b439fefc3f7ea7baac7115c723fc392434 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Thu, 30 May 2024 23:55:59 +0000 Subject: [PATCH 056/123] Runs update.sh --- 27/apache/Dockerfile | 6 +++--- 27/fpm-alpine/Dockerfile | 6 +++--- 27/fpm/Dockerfile | 6 +++--- versions.json | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/27/apache/Dockerfile b/27/apache/Dockerfile index 4e2f89c1..4163819f 100644 --- a/27/apache/Dockerfile +++ b/27/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 27.1.9 +ENV NEXTCLOUD_VERSION 27.1.10 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-27.1.9.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.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/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index e4b0e500..8268b5ac 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -113,7 +113,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.9 +ENV NEXTCLOUD_VERSION 27.1.10 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -121,8 +121,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.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/27/fpm/Dockerfile b/27/fpm/Dockerfile index 1e029cac..cfbbf9e6 100644 --- a/27/fpm/Dockerfile +++ b/27/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.9 +ENV NEXTCLOUD_VERSION 27.1.10 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-27.1.9.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.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/versions.json b/versions.json index e6738f1d..23758543 100644 --- a/versions.json +++ b/versions.json @@ -53,9 +53,9 @@ }, "27": { "branch": "27", - "version": "27.1.9", - "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.9.tar.bz2.asc", + "version": "27.1.10", + "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From 13f51c4f70676edb464ce5ea03631403b54623df Mon Sep 17 00:00:00 2001 From: J0WI Date: Fri, 31 May 2024 00:08:06 +0000 Subject: [PATCH 057/123] Bump to 28.0.6 Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index d84c6a26..da3a7700 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='28.0.5' +stable_channel='28.0.6' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From 48180ee80726909ecafdde00bd0c99fa093a2cfc Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 4 Jun 2024 17:05:49 -0400 Subject: [PATCH 058/123] fix(install): Finish via web reminder now shown under all relevant scenarios (#2223) Signed-off-by: Josh Richards --- 27/apache/entrypoint.sh | 11 +++++++---- 27/fpm-alpine/entrypoint.sh | 11 +++++++---- 27/fpm/entrypoint.sh | 11 +++++++---- 28/apache/entrypoint.sh | 11 +++++++---- 28/fpm-alpine/entrypoint.sh | 11 +++++++---- 28/fpm/entrypoint.sh | 11 +++++++---- 29/apache/entrypoint.sh | 11 +++++++---- 29/fpm-alpine/entrypoint.sh | 11 +++++++---- 29/fpm/entrypoint.sh | 11 +++++++---- docker-entrypoint.sh | 11 +++++++---- 10 files changed, 70 insertions(+), 40 deletions(-) diff --git a/27/apache/entrypoint.sh b/27/apache/entrypoint.sh index 5b627f07..541971c6 100755 --- a/27/apache/entrypoint.sh +++ b/27/apache/entrypoint.sh @@ -186,6 +186,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env NEXTCLOUD_ADMIN_PASSWORD file_env NEXTCLOUD_ADMIN_USER + install=false if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then # shellcheck disable=SC2016 install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' @@ -201,7 +202,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env POSTGRES_PASSWORD file_env POSTGRES_USER - install=false if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 @@ -246,9 +246,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi + fi + fi + # not enough specified to do a fully automated installation + if [ "$install" = false ]; then + echo "Next step: Access your instance to finish the web-based installation!" + echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." fi # Upgrade else diff --git a/27/fpm-alpine/entrypoint.sh b/27/fpm-alpine/entrypoint.sh index 5b627f07..541971c6 100755 --- a/27/fpm-alpine/entrypoint.sh +++ b/27/fpm-alpine/entrypoint.sh @@ -186,6 +186,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env NEXTCLOUD_ADMIN_PASSWORD file_env NEXTCLOUD_ADMIN_USER + install=false if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then # shellcheck disable=SC2016 install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' @@ -201,7 +202,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env POSTGRES_PASSWORD file_env POSTGRES_USER - install=false if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 @@ -246,9 +246,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi + fi + fi + # not enough specified to do a fully automated installation + if [ "$install" = false ]; then + echo "Next step: Access your instance to finish the web-based installation!" + echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." fi # Upgrade else diff --git a/27/fpm/entrypoint.sh b/27/fpm/entrypoint.sh index 5b627f07..541971c6 100755 --- a/27/fpm/entrypoint.sh +++ b/27/fpm/entrypoint.sh @@ -186,6 +186,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env NEXTCLOUD_ADMIN_PASSWORD file_env NEXTCLOUD_ADMIN_USER + install=false if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then # shellcheck disable=SC2016 install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' @@ -201,7 +202,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env POSTGRES_PASSWORD file_env POSTGRES_USER - install=false if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 @@ -246,9 +246,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi + fi + fi + # not enough specified to do a fully automated installation + if [ "$install" = false ]; then + echo "Next step: Access your instance to finish the web-based installation!" + echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." fi # Upgrade else diff --git a/28/apache/entrypoint.sh b/28/apache/entrypoint.sh index 5b627f07..541971c6 100755 --- a/28/apache/entrypoint.sh +++ b/28/apache/entrypoint.sh @@ -186,6 +186,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env NEXTCLOUD_ADMIN_PASSWORD file_env NEXTCLOUD_ADMIN_USER + install=false if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then # shellcheck disable=SC2016 install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' @@ -201,7 +202,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env POSTGRES_PASSWORD file_env POSTGRES_USER - install=false if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 @@ -246,9 +246,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi + fi + fi + # not enough specified to do a fully automated installation + if [ "$install" = false ]; then + echo "Next step: Access your instance to finish the web-based installation!" + echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." fi # Upgrade else diff --git a/28/fpm-alpine/entrypoint.sh b/28/fpm-alpine/entrypoint.sh index 5b627f07..541971c6 100755 --- a/28/fpm-alpine/entrypoint.sh +++ b/28/fpm-alpine/entrypoint.sh @@ -186,6 +186,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env NEXTCLOUD_ADMIN_PASSWORD file_env NEXTCLOUD_ADMIN_USER + install=false if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then # shellcheck disable=SC2016 install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' @@ -201,7 +202,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env POSTGRES_PASSWORD file_env POSTGRES_USER - install=false if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 @@ -246,9 +246,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi + fi + fi + # not enough specified to do a fully automated installation + if [ "$install" = false ]; then + echo "Next step: Access your instance to finish the web-based installation!" + echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." fi # Upgrade else diff --git a/28/fpm/entrypoint.sh b/28/fpm/entrypoint.sh index 5b627f07..541971c6 100755 --- a/28/fpm/entrypoint.sh +++ b/28/fpm/entrypoint.sh @@ -186,6 +186,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env NEXTCLOUD_ADMIN_PASSWORD file_env NEXTCLOUD_ADMIN_USER + install=false if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then # shellcheck disable=SC2016 install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' @@ -201,7 +202,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env POSTGRES_PASSWORD file_env POSTGRES_USER - install=false if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 @@ -246,9 +246,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi + fi + fi + # not enough specified to do a fully automated installation + if [ "$install" = false ]; then + echo "Next step: Access your instance to finish the web-based installation!" + echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." fi # Upgrade else diff --git a/29/apache/entrypoint.sh b/29/apache/entrypoint.sh index 5b627f07..541971c6 100755 --- a/29/apache/entrypoint.sh +++ b/29/apache/entrypoint.sh @@ -186,6 +186,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env NEXTCLOUD_ADMIN_PASSWORD file_env NEXTCLOUD_ADMIN_USER + install=false if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then # shellcheck disable=SC2016 install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' @@ -201,7 +202,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env POSTGRES_PASSWORD file_env POSTGRES_USER - install=false if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 @@ -246,9 +246,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi + fi + fi + # not enough specified to do a fully automated installation + if [ "$install" = false ]; then + echo "Next step: Access your instance to finish the web-based installation!" + echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." fi # Upgrade else diff --git a/29/fpm-alpine/entrypoint.sh b/29/fpm-alpine/entrypoint.sh index 5b627f07..541971c6 100755 --- a/29/fpm-alpine/entrypoint.sh +++ b/29/fpm-alpine/entrypoint.sh @@ -186,6 +186,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env NEXTCLOUD_ADMIN_PASSWORD file_env NEXTCLOUD_ADMIN_USER + install=false if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then # shellcheck disable=SC2016 install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' @@ -201,7 +202,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env POSTGRES_PASSWORD file_env POSTGRES_USER - install=false if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 @@ -246,9 +246,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi + fi + fi + # not enough specified to do a fully automated installation + if [ "$install" = false ]; then + echo "Next step: Access your instance to finish the web-based installation!" + echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." fi # Upgrade else diff --git a/29/fpm/entrypoint.sh b/29/fpm/entrypoint.sh index 5b627f07..541971c6 100755 --- a/29/fpm/entrypoint.sh +++ b/29/fpm/entrypoint.sh @@ -186,6 +186,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env NEXTCLOUD_ADMIN_PASSWORD file_env NEXTCLOUD_ADMIN_USER + install=false if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then # shellcheck disable=SC2016 install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' @@ -201,7 +202,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env POSTGRES_PASSWORD file_env POSTGRES_USER - install=false if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 @@ -246,9 +246,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi + fi + fi + # not enough specified to do a fully automated installation + if [ "$install" = false ]; then + echo "Next step: Access your instance to finish the web-based installation!" + echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." fi # Upgrade else diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 5b627f07..541971c6 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -186,6 +186,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env NEXTCLOUD_ADMIN_PASSWORD file_env NEXTCLOUD_ADMIN_USER + install=false if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then # shellcheck disable=SC2016 install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' @@ -201,7 +202,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP file_env POSTGRES_PASSWORD file_env POSTGRES_USER - install=false if [ -n "${SQLITE_DATABASE+x}" ]; then echo "Installing with SQLite database" # shellcheck disable=SC2016 @@ -246,9 +246,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi run_path post-installation - else - echo "Please run the web-based installer on first connect!" - fi + fi + fi + # not enough specified to do a fully automated installation + if [ "$install" = false ]; then + echo "Next step: Access your instance to finish the web-based installation!" + echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." fi # Upgrade else From 5fdeb7bc4af71535390bd7bb92c89e210ee21e76 Mon Sep 17 00:00:00 2001 From: J0WI Date: Tue, 4 Jun 2024 21:48:48 +0000 Subject: [PATCH 059/123] Alpine 3.20 (#2233) --- 27/fpm-alpine/Dockerfile | 2 +- 28/fpm-alpine/Dockerfile | 2 +- 29/fpm-alpine/Dockerfile | 2 +- update.sh | 2 +- versions.json | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index 8268b5ac..c3a9fcb7 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT: created by update.sh from Dockerfile-alpine.template -FROM php:8.2-fpm-alpine3.19 +FROM php:8.2-fpm-alpine3.20 # entrypoint.sh and cron.sh dependencies RUN set -ex; \ diff --git a/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index b7af26fc..018256a8 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.19 +FROM php:8.2-fpm-alpine3.20 # entrypoint.sh and cron.sh dependencies RUN set -ex; \ diff --git a/29/fpm-alpine/Dockerfile b/29/fpm-alpine/Dockerfile index 0b15d62f..7d7bc580 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.19 +FROM php:8.2-fpm-alpine3.20 # entrypoint.sh and cron.sh dependencies RUN set -ex; \ diff --git a/update.sh b/update.sh index 015cf9ae..bc35ce19 100755 --- a/update.sh +++ b/update.sh @@ -2,7 +2,7 @@ set -eo pipefail declare -A alpine_version=( - [default]='3.19' + [default]='3.20' ) declare -A debian_version=( diff --git a/versions.json b/versions.json index 23758543..4d565265 100644 --- a/versions.json +++ b/versions.json @@ -20,7 +20,7 @@ "fpm-alpine": { "variant": "fpm-alpine", "base": "alpine", - "baseVersion": "3.19", + "baseVersion": "3.20", "phpVersion": "8.2" } } @@ -46,7 +46,7 @@ "fpm-alpine": { "variant": "fpm-alpine", "base": "alpine", - "baseVersion": "3.19", + "baseVersion": "3.20", "phpVersion": "8.2" } } @@ -72,7 +72,7 @@ "fpm-alpine": { "variant": "fpm-alpine", "base": "alpine", - "baseVersion": "3.19", + "baseVersion": "3.20", "phpVersion": "8.2" } } From ec1af314c23b6be86062532447d4a0cbe1dc8659 Mon Sep 17 00:00:00 2001 From: Vesperia Art Date: Thu, 6 Jun 2024 17:27:42 -0400 Subject: [PATCH 060/123] Update redis.config.php (#2232) Correctly set the redis password config from the REDIS_HOST_PASSWORD_FILE environment variable. Fix an issue similar to #1402 when using the REDIS_HOST_PASSWORD_FILE environment variable to provide the redis host secret. Signed-off-by: Vesperia Art --- .config/redis.config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/redis.config.php b/.config/redis.config.php index a5fde3c7..346457c5 100644 --- a/.config/redis.config.php +++ b/.config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); From 1ad8fd89b98e0a6dfe4609e23667222e80d2ccec Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Thu, 6 Jun 2024 21:28:04 +0000 Subject: [PATCH 061/123] Runs update.sh --- 27/apache/config/redis.config.php | 2 +- 27/fpm-alpine/config/redis.config.php | 2 +- 27/fpm/config/redis.config.php | 2 +- 28/apache/config/redis.config.php | 2 +- 28/fpm-alpine/config/redis.config.php | 2 +- 28/fpm/config/redis.config.php | 2 +- 29/apache/Dockerfile | 6 +++--- 29/apache/config/redis.config.php | 2 +- 29/fpm-alpine/Dockerfile | 6 +++--- 29/fpm-alpine/config/redis.config.php | 2 +- 29/fpm/Dockerfile | 6 +++--- 29/fpm/config/redis.config.php | 2 +- latest.txt | 2 +- versions.json | 6 +++--- 14 files changed, 22 insertions(+), 22 deletions(-) diff --git a/27/apache/config/redis.config.php b/27/apache/config/redis.config.php index a5fde3c7..346457c5 100644 --- a/27/apache/config/redis.config.php +++ b/27/apache/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/27/fpm-alpine/config/redis.config.php b/27/fpm-alpine/config/redis.config.php index a5fde3c7..346457c5 100644 --- a/27/fpm-alpine/config/redis.config.php +++ b/27/fpm-alpine/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/27/fpm/config/redis.config.php b/27/fpm/config/redis.config.php index a5fde3c7..346457c5 100644 --- a/27/fpm/config/redis.config.php +++ b/27/fpm/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/28/apache/config/redis.config.php b/28/apache/config/redis.config.php index a5fde3c7..346457c5 100644 --- a/28/apache/config/redis.config.php +++ b/28/apache/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(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/config/redis.config.php b/28/fpm-alpine/config/redis.config.php index a5fde3c7..346457c5 100644 --- a/28/fpm-alpine/config/redis.config.php +++ b/28/fpm-alpine/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/28/fpm/config/redis.config.php b/28/fpm/config/redis.config.php index a5fde3c7..346457c5 100644 --- a/28/fpm/config/redis.config.php +++ b/28/fpm/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/29/apache/Dockerfile b/29/apache/Dockerfile index bd6e4682..c0aaaad1 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 29.0.1 +ENV NEXTCLOUD_VERSION 29.0.2 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.1.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.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/apache/config/redis.config.php b/29/apache/config/redis.config.php index a5fde3c7..346457c5 100644 --- a/29/apache/config/redis.config.php +++ b/29/apache/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(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/Dockerfile b/29/fpm-alpine/Dockerfile index 7d7bc580..17cfbaaa 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -113,7 +113,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.1 +ENV NEXTCLOUD_VERSION 29.0.2 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -121,8 +121,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.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/config/redis.config.php b/29/fpm-alpine/config/redis.config.php index a5fde3c7..346457c5 100644 --- a/29/fpm-alpine/config/redis.config.php +++ b/29/fpm-alpine/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/29/fpm/Dockerfile b/29/fpm/Dockerfile index 2510c043..a6c640bf 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.1 +ENV NEXTCLOUD_VERSION 29.0.2 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.1.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.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/config/redis.config.php b/29/fpm/config/redis.config.php index a5fde3c7..346457c5 100644 --- a/29/fpm/config/redis.config.php +++ b/29/fpm/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/latest.txt b/latest.txt index a67d7601..fa23554d 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -29.0.1 +29.0.2 diff --git a/versions.json b/versions.json index 4d565265..c8cb6562 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "29": { "branch": "29", - "version": "29.0.1", - "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.1.tar.bz2.asc", + "version": "29.0.2", + "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From 2accbecd979916d0c0f63fcb97d87f4970616db9 Mon Sep 17 00:00:00 2001 From: J0WI Date: Tue, 18 Jun 2024 20:13:05 +0000 Subject: [PATCH 062/123] Drop file_exists check for _FILE variables (#2234) * Drop file_exists check for _FILE variables A PHP warning is generated if the file does not exist. Otherwise there is no indicator why the variable is not used. Signed-off-by: J0WI * fixup: typo in smtp.config.php Signed-off-by: Josh --------- Signed-off-by: J0WI Signed-off-by: Josh Co-authored-by: Josh --- .config/redis.config.php | 2 +- .config/s3.config.php | 6 +++--- .config/smtp.config.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.config/redis.config.php b/.config/redis.config.php index 346457c5..a5b13da6 100644 --- a/.config/redis.config.php +++ b/.config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/.config/s3.config.php b/.config/s3.config.php index 374cba2d..9941c562 100644 --- a/.config/s3.config.php +++ b/.config/s3.config.php @@ -24,7 +24,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { ) ); - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_KEY_FILE')) { $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_KEY')) { $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); @@ -32,7 +32,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['key'] = ''; } - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SECRET')) { $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); @@ -40,7 +40,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['secret'] = ''; } - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); diff --git a/.config/smtp.config.php b/.config/smtp.config.php index 5006fe47..66a2ef7e 100644 --- a/.config/smtp.config.php +++ b/.config/smtp.config.php @@ -5,14 +5,14 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', 'mail_smtpname' => getenv('SMTP_NAME') ?: '', 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), 'mail_domain' => getenv('MAIL_DOMAIN'), ); - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + if (getenv('SMTP_PASSWORD_FILE')) { $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); } elseif (getenv('SMTP_PASSWORD')) { $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); From bf8136a83843f27513a3fe4e2d1e0a20d90b6572 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Tue, 18 Jun 2024 20:13:20 +0000 Subject: [PATCH 063/123] Runs update.sh --- 27/apache/config/redis.config.php | 2 +- 27/apache/config/s3.config.php | 6 +++--- 27/apache/config/smtp.config.php | 4 ++-- 27/fpm-alpine/config/redis.config.php | 2 +- 27/fpm-alpine/config/s3.config.php | 6 +++--- 27/fpm-alpine/config/smtp.config.php | 4 ++-- 27/fpm/config/redis.config.php | 2 +- 27/fpm/config/s3.config.php | 6 +++--- 27/fpm/config/smtp.config.php | 4 ++-- 28/apache/config/redis.config.php | 2 +- 28/apache/config/s3.config.php | 6 +++--- 28/apache/config/smtp.config.php | 4 ++-- 28/fpm-alpine/config/redis.config.php | 2 +- 28/fpm-alpine/config/s3.config.php | 6 +++--- 28/fpm-alpine/config/smtp.config.php | 4 ++-- 28/fpm/config/redis.config.php | 2 +- 28/fpm/config/s3.config.php | 6 +++--- 28/fpm/config/smtp.config.php | 4 ++-- 29/apache/config/redis.config.php | 2 +- 29/apache/config/s3.config.php | 6 +++--- 29/apache/config/smtp.config.php | 4 ++-- 29/fpm-alpine/config/redis.config.php | 2 +- 29/fpm-alpine/config/s3.config.php | 6 +++--- 29/fpm-alpine/config/smtp.config.php | 4 ++-- 29/fpm/config/redis.config.php | 2 +- 29/fpm/config/s3.config.php | 6 +++--- 29/fpm/config/smtp.config.php | 4 ++-- 27 files changed, 54 insertions(+), 54 deletions(-) diff --git a/27/apache/config/redis.config.php b/27/apache/config/redis.config.php index 346457c5..a5b13da6 100644 --- a/27/apache/config/redis.config.php +++ b/27/apache/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/27/apache/config/s3.config.php b/27/apache/config/s3.config.php index 374cba2d..9941c562 100644 --- a/27/apache/config/s3.config.php +++ b/27/apache/config/s3.config.php @@ -24,7 +24,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { ) ); - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_KEY_FILE')) { $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_KEY')) { $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); @@ -32,7 +32,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['key'] = ''; } - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SECRET')) { $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); @@ -40,7 +40,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['secret'] = ''; } - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); diff --git a/27/apache/config/smtp.config.php b/27/apache/config/smtp.config.php index 5006fe47..66a2ef7e 100644 --- a/27/apache/config/smtp.config.php +++ b/27/apache/config/smtp.config.php @@ -5,14 +5,14 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', 'mail_smtpname' => getenv('SMTP_NAME') ?: '', 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), 'mail_domain' => getenv('MAIL_DOMAIN'), ); - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + if (getenv('SMTP_PASSWORD_FILE')) { $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); } elseif (getenv('SMTP_PASSWORD')) { $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); diff --git a/27/fpm-alpine/config/redis.config.php b/27/fpm-alpine/config/redis.config.php index 346457c5..a5b13da6 100644 --- a/27/fpm-alpine/config/redis.config.php +++ b/27/fpm-alpine/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/27/fpm-alpine/config/s3.config.php b/27/fpm-alpine/config/s3.config.php index 374cba2d..9941c562 100644 --- a/27/fpm-alpine/config/s3.config.php +++ b/27/fpm-alpine/config/s3.config.php @@ -24,7 +24,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { ) ); - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_KEY_FILE')) { $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_KEY')) { $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); @@ -32,7 +32,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['key'] = ''; } - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SECRET')) { $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); @@ -40,7 +40,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['secret'] = ''; } - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); diff --git a/27/fpm-alpine/config/smtp.config.php b/27/fpm-alpine/config/smtp.config.php index 5006fe47..66a2ef7e 100644 --- a/27/fpm-alpine/config/smtp.config.php +++ b/27/fpm-alpine/config/smtp.config.php @@ -5,14 +5,14 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', 'mail_smtpname' => getenv('SMTP_NAME') ?: '', 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), 'mail_domain' => getenv('MAIL_DOMAIN'), ); - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + if (getenv('SMTP_PASSWORD_FILE')) { $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); } elseif (getenv('SMTP_PASSWORD')) { $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); diff --git a/27/fpm/config/redis.config.php b/27/fpm/config/redis.config.php index 346457c5..a5b13da6 100644 --- a/27/fpm/config/redis.config.php +++ b/27/fpm/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), ); diff --git a/27/fpm/config/s3.config.php b/27/fpm/config/s3.config.php index 374cba2d..9941c562 100644 --- a/27/fpm/config/s3.config.php +++ b/27/fpm/config/s3.config.php @@ -24,7 +24,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { ) ); - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_KEY_FILE')) { $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_KEY')) { $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); @@ -32,7 +32,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['key'] = ''; } - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SECRET')) { $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); @@ -40,7 +40,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['secret'] = ''; } - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); diff --git a/27/fpm/config/smtp.config.php b/27/fpm/config/smtp.config.php index 5006fe47..66a2ef7e 100644 --- a/27/fpm/config/smtp.config.php +++ b/27/fpm/config/smtp.config.php @@ -5,14 +5,14 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', 'mail_smtpname' => getenv('SMTP_NAME') ?: '', 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), 'mail_domain' => getenv('MAIL_DOMAIN'), ); - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + if (getenv('SMTP_PASSWORD_FILE')) { $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); } elseif (getenv('SMTP_PASSWORD')) { $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); diff --git a/28/apache/config/redis.config.php b/28/apache/config/redis.config.php index 346457c5..a5b13da6 100644 --- a/28/apache/config/redis.config.php +++ b/28/apache/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), + '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/config/s3.config.php b/28/apache/config/s3.config.php index 374cba2d..9941c562 100644 --- a/28/apache/config/s3.config.php +++ b/28/apache/config/s3.config.php @@ -24,7 +24,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { ) ); - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_KEY_FILE')) { $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_KEY')) { $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); @@ -32,7 +32,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['key'] = ''; } - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SECRET')) { $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); @@ -40,7 +40,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['secret'] = ''; } - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); diff --git a/28/apache/config/smtp.config.php b/28/apache/config/smtp.config.php index 5006fe47..66a2ef7e 100644 --- a/28/apache/config/smtp.config.php +++ b/28/apache/config/smtp.config.php @@ -5,14 +5,14 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', 'mail_smtpname' => getenv('SMTP_NAME') ?: '', 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), 'mail_domain' => getenv('MAIL_DOMAIN'), ); - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + if (getenv('SMTP_PASSWORD_FILE')) { $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); } elseif (getenv('SMTP_PASSWORD')) { $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); diff --git a/28/fpm-alpine/config/redis.config.php b/28/fpm-alpine/config/redis.config.php index 346457c5..a5b13da6 100644 --- a/28/fpm-alpine/config/redis.config.php +++ b/28/fpm-alpine/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), + '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/config/s3.config.php b/28/fpm-alpine/config/s3.config.php index 374cba2d..9941c562 100644 --- a/28/fpm-alpine/config/s3.config.php +++ b/28/fpm-alpine/config/s3.config.php @@ -24,7 +24,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { ) ); - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_KEY_FILE')) { $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_KEY')) { $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); @@ -32,7 +32,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['key'] = ''; } - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SECRET')) { $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); @@ -40,7 +40,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['secret'] = ''; } - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); diff --git a/28/fpm-alpine/config/smtp.config.php b/28/fpm-alpine/config/smtp.config.php index 5006fe47..66a2ef7e 100644 --- a/28/fpm-alpine/config/smtp.config.php +++ b/28/fpm-alpine/config/smtp.config.php @@ -5,14 +5,14 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', 'mail_smtpname' => getenv('SMTP_NAME') ?: '', 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), 'mail_domain' => getenv('MAIL_DOMAIN'), ); - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + if (getenv('SMTP_PASSWORD_FILE')) { $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); } elseif (getenv('SMTP_PASSWORD')) { $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); diff --git a/28/fpm/config/redis.config.php b/28/fpm/config/redis.config.php index 346457c5..a5b13da6 100644 --- a/28/fpm/config/redis.config.php +++ b/28/fpm/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), + '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/config/s3.config.php b/28/fpm/config/s3.config.php index 374cba2d..9941c562 100644 --- a/28/fpm/config/s3.config.php +++ b/28/fpm/config/s3.config.php @@ -24,7 +24,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { ) ); - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_KEY_FILE')) { $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_KEY')) { $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); @@ -32,7 +32,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['key'] = ''; } - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SECRET')) { $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); @@ -40,7 +40,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['secret'] = ''; } - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); diff --git a/28/fpm/config/smtp.config.php b/28/fpm/config/smtp.config.php index 5006fe47..66a2ef7e 100644 --- a/28/fpm/config/smtp.config.php +++ b/28/fpm/config/smtp.config.php @@ -5,14 +5,14 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', 'mail_smtpname' => getenv('SMTP_NAME') ?: '', 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), 'mail_domain' => getenv('MAIL_DOMAIN'), ); - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + if (getenv('SMTP_PASSWORD_FILE')) { $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); } elseif (getenv('SMTP_PASSWORD')) { $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); diff --git a/29/apache/config/redis.config.php b/29/apache/config/redis.config.php index 346457c5..a5b13da6 100644 --- a/29/apache/config/redis.config.php +++ b/29/apache/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), + '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/config/s3.config.php b/29/apache/config/s3.config.php index 374cba2d..9941c562 100644 --- a/29/apache/config/s3.config.php +++ b/29/apache/config/s3.config.php @@ -24,7 +24,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { ) ); - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_KEY_FILE')) { $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_KEY')) { $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); @@ -32,7 +32,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['key'] = ''; } - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SECRET')) { $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); @@ -40,7 +40,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['secret'] = ''; } - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); diff --git a/29/apache/config/smtp.config.php b/29/apache/config/smtp.config.php index 5006fe47..66a2ef7e 100644 --- a/29/apache/config/smtp.config.php +++ b/29/apache/config/smtp.config.php @@ -5,14 +5,14 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', 'mail_smtpname' => getenv('SMTP_NAME') ?: '', 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), 'mail_domain' => getenv('MAIL_DOMAIN'), ); - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + if (getenv('SMTP_PASSWORD_FILE')) { $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); } elseif (getenv('SMTP_PASSWORD')) { $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); diff --git a/29/fpm-alpine/config/redis.config.php b/29/fpm-alpine/config/redis.config.php index 346457c5..a5b13da6 100644 --- a/29/fpm-alpine/config/redis.config.php +++ b/29/fpm-alpine/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), + '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/config/s3.config.php b/29/fpm-alpine/config/s3.config.php index 374cba2d..9941c562 100644 --- a/29/fpm-alpine/config/s3.config.php +++ b/29/fpm-alpine/config/s3.config.php @@ -24,7 +24,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { ) ); - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_KEY_FILE')) { $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_KEY')) { $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); @@ -32,7 +32,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['key'] = ''; } - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SECRET')) { $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); @@ -40,7 +40,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['secret'] = ''; } - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); diff --git a/29/fpm-alpine/config/smtp.config.php b/29/fpm-alpine/config/smtp.config.php index 5006fe47..66a2ef7e 100644 --- a/29/fpm-alpine/config/smtp.config.php +++ b/29/fpm-alpine/config/smtp.config.php @@ -5,14 +5,14 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', 'mail_smtpname' => getenv('SMTP_NAME') ?: '', 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), 'mail_domain' => getenv('MAIL_DOMAIN'), ); - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + if (getenv('SMTP_PASSWORD_FILE')) { $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); } elseif (getenv('SMTP_PASSWORD')) { $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); diff --git a/29/fpm/config/redis.config.php b/29/fpm/config/redis.config.php index 346457c5..a5b13da6 100644 --- a/29/fpm/config/redis.config.php +++ b/29/fpm/config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), + '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/config/s3.config.php b/29/fpm/config/s3.config.php index 374cba2d..9941c562 100644 --- a/29/fpm/config/s3.config.php +++ b/29/fpm/config/s3.config.php @@ -24,7 +24,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { ) ); - if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_KEY_FILE')) { $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_KEY')) { $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); @@ -32,7 +32,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['key'] = ''; } - if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) { + if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SECRET')) { $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); @@ -40,7 +40,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { $CONFIG['objectstore']['arguments']['secret'] = ''; } - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) { + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); diff --git a/29/fpm/config/smtp.config.php b/29/fpm/config/smtp.config.php index 5006fe47..66a2ef7e 100644 --- a/29/fpm/config/smtp.config.php +++ b/29/fpm/config/smtp.config.php @@ -5,14 +5,14 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))), + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', 'mail_smtpname' => getenv('SMTP_NAME') ?: '', 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), 'mail_domain' => getenv('MAIL_DOMAIN'), ); - if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) { + if (getenv('SMTP_PASSWORD_FILE')) { $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); } elseif (getenv('SMTP_PASSWORD')) { $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); From f45486780338805720417c023ed2ccba88f8536e Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 18 Jun 2024 16:21:30 -0400 Subject: [PATCH 064/123] docs(README): SMTP/MAIL values always override web UI (#2243) Fixes #1312 Signed-off-by: Josh --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c69999b..bfa9213c 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,7 @@ If you want to use Redis you have to create a separate [Redis](https://hub.docke The use of Redis is recommended to prevent file locking problems. See the examples for further instructions. -To use an external SMTP server, you have to provide the connection details. To configure Nextcloud to use SMTP add: +To use an external SMTP server, you have to provide the connection details. Note that if you configure these values via Docker, you should **not** use the Nexcloud Web UI to configure external SMTP server parameters. Conversely, if you prefer to use the Web UI, do **not** set these variables here (because these variables will override whatever you attempt to set in the Web UI for these parameters). To configure Nextcloud to use SMTP add: - `SMTP_HOST` (not set by default): The hostname of the SMTP server. - `SMTP_SECURE` (empty by default): Set to `ssl` to use SSL, or `tls` to use STARTTLS. From 4ac47a97c8a089962411bac1f305534e8380f1c3 Mon Sep 17 00:00:00 2001 From: jessebot Date: Tue, 25 Jun 2024 10:10:01 +0200 Subject: [PATCH 065/123] add imagemagick-svg to all the alpine images Signed-off-by: jessebot --- 27/fpm-alpine/Dockerfile | 1 + 28/fpm-alpine/Dockerfile | 1 + 29/fpm-alpine/Dockerfile | 1 + Dockerfile-alpine.template | 1 + 4 files changed, 4 insertions(+) diff --git a/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index c3a9fcb7..cf7abaf6 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -6,6 +6,7 @@ RUN set -ex; \ \ apk add --no-cache \ imagemagick \ + imagemagick-svg \ rsync \ ; \ \ diff --git a/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 018256a8..ef0c48f0 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -6,6 +6,7 @@ RUN set -ex; \ \ apk add --no-cache \ imagemagick \ + imagemagick-svg \ rsync \ ; \ \ diff --git a/29/fpm-alpine/Dockerfile b/29/fpm-alpine/Dockerfile index 17cfbaaa..4103226d 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -6,6 +6,7 @@ RUN set -ex; \ \ apk add --no-cache \ imagemagick \ + imagemagick-svg \ rsync \ ; \ \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 4553997a..1a9a187e 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -5,6 +5,7 @@ RUN set -ex; \ \ apk add --no-cache \ imagemagick \ + imagemagick-svg \ rsync \ ; \ \ From 3e9cdb17c418350aabb5ef6b770a5f98e63ab24f Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Tue, 25 Jun 2024 20:16:53 +0000 Subject: [PATCH 066/123] Runs update.sh --- 27/apache/Dockerfile | 6 +++--- 27/fpm-alpine/Dockerfile | 6 +++--- 27/fpm/Dockerfile | 6 +++--- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/fpm/Dockerfile | 6 +++--- 29/apache/Dockerfile | 6 +++--- 29/fpm-alpine/Dockerfile | 6 +++--- 29/fpm/Dockerfile | 6 +++--- latest.txt | 2 +- versions.json | 18 +++++++++--------- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/27/apache/Dockerfile b/27/apache/Dockerfile index 4163819f..10b2e00f 100644 --- a/27/apache/Dockerfile +++ b/27/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 27.1.10 +ENV NEXTCLOUD_VERSION 27.1.11 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-27.1.10.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.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/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index c3a9fcb7..9ed29363 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -113,7 +113,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.10 +ENV NEXTCLOUD_VERSION 27.1.11 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -121,8 +121,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.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/27/fpm/Dockerfile b/27/fpm/Dockerfile index cfbbf9e6..8602fcca 100644 --- a/27/fpm/Dockerfile +++ b/27/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 27.1.10 +ENV NEXTCLOUD_VERSION 27.1.11 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-27.1.10.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.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/28/apache/Dockerfile b/28/apache/Dockerfile index e317d1d8..2ea543a7 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.6 +ENV NEXTCLOUD_VERSION 28.0.7 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-28.0.6.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.6.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 018256a8..63090ee0 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -113,7 +113,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.6 +ENV NEXTCLOUD_VERSION 28.0.7 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -121,8 +121,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.6.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.6.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index 62015da4..83c009ff 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.6 +ENV NEXTCLOUD_VERSION 28.0.7 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-28.0.6.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.6.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.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/apache/Dockerfile b/29/apache/Dockerfile index c0aaaad1..40b7c93f 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 29.0.2 +ENV NEXTCLOUD_VERSION 29.0.3 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.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 17cfbaaa..48aa3db9 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -113,7 +113,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.2 +ENV NEXTCLOUD_VERSION 29.0.3 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -121,8 +121,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.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 a6c640bf..5bba909f 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.2 +ENV NEXTCLOUD_VERSION 29.0.3 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.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 fa23554d..c5f3eb7e 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -29.0.2 +29.0.3 diff --git a/versions.json b/versions.json index c8cb6562..47c5f9b4 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "29": { "branch": "29", - "version": "29.0.2", - "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.2.tar.bz2.asc", + "version": "29.0.3", + "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -27,9 +27,9 @@ }, "28": { "branch": "28", - "version": "28.0.6", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.6.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.6.tar.bz2.asc", + "version": "28.0.7", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -53,9 +53,9 @@ }, "27": { "branch": "27", - "version": "27.1.10", - "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.10.tar.bz2.asc", + "version": "27.1.11", + "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From 5c58b2aa09b227949fbdd3d928179f6ed768c755 Mon Sep 17 00:00:00 2001 From: Florian Latifi Date: Tue, 25 Jun 2024 23:25:29 +0200 Subject: [PATCH 067/123] Warn on mismatching auto-config files (#2120) Signed-off-by: Florian Latifi Co-authored-by: Josh --- README.md | 12 ++++++++++++ docker-entrypoint.sh | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/README.md b/README.md index bfa9213c..b9f7a66d 100644 --- a/README.md +++ b/README.md @@ -217,6 +217,18 @@ To customize Apache max file upload limit you can change the following variable: - `APACHE_BODY_LIMIT` (default `1073741824` [1GiB]) This restricts the total size of the HTTP request body sent from the client. It specifies the number of _bytes_ that are allowed in a request body. A value of **0** means **unlimited**. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html#apache) for more information. +### Auto configuration and Nextcloud updates +The image comes with special config files for Nextcloud that set parameters specific to containerized usage (e.g. `upgrade-disable-web.config.php`) or enable auto configuration via environment variables (e.g. `reverse-proxy.config.php`). Within the image, the latest version of these config files are located in `/usr/src/nextcloud/config`. + +During a fresh Nextcloud installation, the latest version (from the image) of these files are copied into `/var/www/html/config` so that they are stored within your container's persistent volume and picked up by Nextcloud alongside your local configuration. + +The copied files, however, are **not** automatically overwritten whenever you update your environment with a newer Nextcloud image. This is to prevent local changes in `/var/www/html/config` from being unexpectedly overwritten. This may lead to your image-specific configuration files becoming outdated and image functionality not matching that which is documented. + +A warning will be generated in the container log output when outdated image-specific configuration files are detected at startup in a running container. When you see this warning, you should manually compare (or copy) the files from `/usr/src/nextcloud/config` to `/var/www/html/config`. + +As long as you have not modified any of the provided config files in `/var/www/html/config` (other than `config.php`) or only added new ones with names that do not conflict with the image specific ones, copying the new ones into place should be safe (but check the source path `/usr/src/nextcloud/config` for any newly named config files to avoid new overlaps just in case). + +Not keeping these files up-to-date when this warning appears may cause certain auto configuration environment variables to be ignored or the image to not work as documented or expected. ## Auto configuration via hook folders diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 541971c6..1c60984c 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -276,6 +276,17 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi ) 9> /var/www/html/nextcloud-init-sync.lock + # warn if config files on persistent storage differ from the latest version of this image + for cfgPath in /usr/src/nextcloud/config/*.php; do + cfgFile=$(basename "$cfgPath") + + if [ "$cfgFile" != "config.sample.php" ]; then + if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then + echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" + fi + fi + done + run_path before-starting fi From cd162a43212520628036e13fbfc1aba201139005 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Tue, 25 Jun 2024 21:25:51 +0000 Subject: [PATCH 068/123] Runs update.sh --- 27/apache/entrypoint.sh | 11 +++++++++++ 27/fpm-alpine/entrypoint.sh | 11 +++++++++++ 27/fpm/entrypoint.sh | 11 +++++++++++ 28/apache/entrypoint.sh | 11 +++++++++++ 28/fpm-alpine/entrypoint.sh | 11 +++++++++++ 28/fpm/entrypoint.sh | 11 +++++++++++ 29/apache/entrypoint.sh | 11 +++++++++++ 29/fpm-alpine/entrypoint.sh | 11 +++++++++++ 29/fpm/entrypoint.sh | 11 +++++++++++ 9 files changed, 99 insertions(+) diff --git a/27/apache/entrypoint.sh b/27/apache/entrypoint.sh index 541971c6..1c60984c 100755 --- a/27/apache/entrypoint.sh +++ b/27/apache/entrypoint.sh @@ -276,6 +276,17 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi ) 9> /var/www/html/nextcloud-init-sync.lock + # warn if config files on persistent storage differ from the latest version of this image + for cfgPath in /usr/src/nextcloud/config/*.php; do + cfgFile=$(basename "$cfgPath") + + if [ "$cfgFile" != "config.sample.php" ]; then + if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then + echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" + fi + fi + done + run_path before-starting fi diff --git a/27/fpm-alpine/entrypoint.sh b/27/fpm-alpine/entrypoint.sh index 541971c6..1c60984c 100755 --- a/27/fpm-alpine/entrypoint.sh +++ b/27/fpm-alpine/entrypoint.sh @@ -276,6 +276,17 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi ) 9> /var/www/html/nextcloud-init-sync.lock + # warn if config files on persistent storage differ from the latest version of this image + for cfgPath in /usr/src/nextcloud/config/*.php; do + cfgFile=$(basename "$cfgPath") + + if [ "$cfgFile" != "config.sample.php" ]; then + if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then + echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" + fi + fi + done + run_path before-starting fi diff --git a/27/fpm/entrypoint.sh b/27/fpm/entrypoint.sh index 541971c6..1c60984c 100755 --- a/27/fpm/entrypoint.sh +++ b/27/fpm/entrypoint.sh @@ -276,6 +276,17 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi ) 9> /var/www/html/nextcloud-init-sync.lock + # warn if config files on persistent storage differ from the latest version of this image + for cfgPath in /usr/src/nextcloud/config/*.php; do + cfgFile=$(basename "$cfgPath") + + if [ "$cfgFile" != "config.sample.php" ]; then + if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then + echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" + fi + fi + done + run_path before-starting fi diff --git a/28/apache/entrypoint.sh b/28/apache/entrypoint.sh index 541971c6..1c60984c 100755 --- a/28/apache/entrypoint.sh +++ b/28/apache/entrypoint.sh @@ -276,6 +276,17 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi ) 9> /var/www/html/nextcloud-init-sync.lock + # warn if config files on persistent storage differ from the latest version of this image + for cfgPath in /usr/src/nextcloud/config/*.php; do + cfgFile=$(basename "$cfgPath") + + if [ "$cfgFile" != "config.sample.php" ]; then + if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then + echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" + fi + fi + done + run_path before-starting fi diff --git a/28/fpm-alpine/entrypoint.sh b/28/fpm-alpine/entrypoint.sh index 541971c6..1c60984c 100755 --- a/28/fpm-alpine/entrypoint.sh +++ b/28/fpm-alpine/entrypoint.sh @@ -276,6 +276,17 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi ) 9> /var/www/html/nextcloud-init-sync.lock + # warn if config files on persistent storage differ from the latest version of this image + for cfgPath in /usr/src/nextcloud/config/*.php; do + cfgFile=$(basename "$cfgPath") + + if [ "$cfgFile" != "config.sample.php" ]; then + if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then + echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" + fi + fi + done + run_path before-starting fi diff --git a/28/fpm/entrypoint.sh b/28/fpm/entrypoint.sh index 541971c6..1c60984c 100755 --- a/28/fpm/entrypoint.sh +++ b/28/fpm/entrypoint.sh @@ -276,6 +276,17 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi ) 9> /var/www/html/nextcloud-init-sync.lock + # warn if config files on persistent storage differ from the latest version of this image + for cfgPath in /usr/src/nextcloud/config/*.php; do + cfgFile=$(basename "$cfgPath") + + if [ "$cfgFile" != "config.sample.php" ]; then + if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then + echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" + fi + fi + done + run_path before-starting fi diff --git a/29/apache/entrypoint.sh b/29/apache/entrypoint.sh index 541971c6..1c60984c 100755 --- a/29/apache/entrypoint.sh +++ b/29/apache/entrypoint.sh @@ -276,6 +276,17 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi ) 9> /var/www/html/nextcloud-init-sync.lock + # warn if config files on persistent storage differ from the latest version of this image + for cfgPath in /usr/src/nextcloud/config/*.php; do + cfgFile=$(basename "$cfgPath") + + if [ "$cfgFile" != "config.sample.php" ]; then + if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then + echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" + fi + fi + done + run_path before-starting fi diff --git a/29/fpm-alpine/entrypoint.sh b/29/fpm-alpine/entrypoint.sh index 541971c6..1c60984c 100755 --- a/29/fpm-alpine/entrypoint.sh +++ b/29/fpm-alpine/entrypoint.sh @@ -276,6 +276,17 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi ) 9> /var/www/html/nextcloud-init-sync.lock + # warn if config files on persistent storage differ from the latest version of this image + for cfgPath in /usr/src/nextcloud/config/*.php; do + cfgFile=$(basename "$cfgPath") + + if [ "$cfgFile" != "config.sample.php" ]; then + if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then + echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" + fi + fi + done + run_path before-starting fi diff --git a/29/fpm/entrypoint.sh b/29/fpm/entrypoint.sh index 541971c6..1c60984c 100755 --- a/29/fpm/entrypoint.sh +++ b/29/fpm/entrypoint.sh @@ -276,6 +276,17 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi ) 9> /var/www/html/nextcloud-init-sync.lock + # warn if config files on persistent storage differ from the latest version of this image + for cfgPath in /usr/src/nextcloud/config/*.php; do + cfgFile=$(basename "$cfgPath") + + if [ "$cfgFile" != "config.sample.php" ]; then + if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then + echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" + fi + fi + done + run_path before-starting fi From 437a2e059905a8e131d8c28c5a27cc6e55715107 Mon Sep 17 00:00:00 2001 From: jessebot Date: Thu, 27 Jun 2024 09:36:21 +0200 Subject: [PATCH 069/123] add imagemagick support for heic, jpeg, pdf, raw, tiff, and webp for the alpine docker image Signed-off-by: jessebot --- 27/fpm-alpine/Dockerfile | 6 ++++++ 28/fpm-alpine/Dockerfile | 6 ++++++ 29/fpm-alpine/Dockerfile | 6 ++++++ Dockerfile-alpine.template | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile index 9ed29363..88791902 100644 --- a/27/fpm-alpine/Dockerfile +++ b/27/fpm-alpine/Dockerfile @@ -6,6 +6,12 @@ RUN set -ex; \ \ apk add --no-cache \ imagemagick \ + imagemagick-pdf \ + imagemagick-jpeg \ + imagemagick-raw \ + imagemagick-tiff \ + imagemagick-heic \ + imagemagick-webp \ rsync \ ; \ \ diff --git a/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 63090ee0..dc93e7e6 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -6,6 +6,12 @@ RUN set -ex; \ \ apk add --no-cache \ imagemagick \ + imagemagick-pdf \ + imagemagick-jpeg \ + imagemagick-raw \ + imagemagick-tiff \ + imagemagick-heic \ + imagemagick-webp \ rsync \ ; \ \ diff --git a/29/fpm-alpine/Dockerfile b/29/fpm-alpine/Dockerfile index 48aa3db9..b055f145 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -6,6 +6,12 @@ RUN set -ex; \ \ apk add --no-cache \ imagemagick \ + imagemagick-pdf \ + imagemagick-jpeg \ + imagemagick-raw \ + imagemagick-tiff \ + imagemagick-heic \ + imagemagick-webp \ rsync \ ; \ \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 4553997a..8d7e8a35 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -5,6 +5,12 @@ RUN set -ex; \ \ apk add --no-cache \ imagemagick \ + imagemagick-pdf \ + imagemagick-jpeg \ + imagemagick-raw \ + imagemagick-tiff \ + imagemagick-heic \ + imagemagick-webp \ rsync \ ; \ \ From 95c49292109eb561630b3b5ffc88e3b039812239 Mon Sep 17 00:00:00 2001 From: J0WI Date: Wed, 3 Jul 2024 00:15:33 +0000 Subject: [PATCH 070/123] Bump stable to 28.0.7 Fix #2252 Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index da3a7700..12bc4a40 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='28.0.6' +stable_channel='28.0.7' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From 75e1b80ba4d448e9bc82876d0be826e9c7fa2c9a Mon Sep 17 00:00:00 2001 From: Aakash parmar <94752702+Aakash788@users.noreply.github.com> Date: Fri, 12 Jul 2024 02:37:21 +0530 Subject: [PATCH 071/123] Fix: Retry logic in entrypoint.sh for Nextcloud installation (#2256) * issue Fix #1911 Signed-off-by: Aakash788 * Fixed issue #1708 Signed-off-by: Aakash788 --------- Signed-off-by: Aakash788 --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 1c60984c..4e06fcc4 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -225,7 +225,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP echo "Starting nextcloud installation" max_retries=10 try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" do echo "Retrying install..." try=$((try+1)) From f02b8b04e3017a4b601d41354f29d5039f3e10c0 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Thu, 11 Jul 2024 21:07:50 +0000 Subject: [PATCH 072/123] Runs update.sh --- 27/apache/entrypoint.sh | 2 +- 27/fpm-alpine/entrypoint.sh | 2 +- 27/fpm/entrypoint.sh | 2 +- 28/apache/entrypoint.sh | 2 +- 28/fpm-alpine/entrypoint.sh | 2 +- 28/fpm/entrypoint.sh | 2 +- 29/apache/entrypoint.sh | 2 +- 29/fpm-alpine/entrypoint.sh | 2 +- 29/fpm/entrypoint.sh | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/27/apache/entrypoint.sh b/27/apache/entrypoint.sh index 1c60984c..4e06fcc4 100755 --- a/27/apache/entrypoint.sh +++ b/27/apache/entrypoint.sh @@ -225,7 +225,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP echo "Starting nextcloud installation" max_retries=10 try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" do echo "Retrying install..." try=$((try+1)) diff --git a/27/fpm-alpine/entrypoint.sh b/27/fpm-alpine/entrypoint.sh index 1c60984c..4e06fcc4 100755 --- a/27/fpm-alpine/entrypoint.sh +++ b/27/fpm-alpine/entrypoint.sh @@ -225,7 +225,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP echo "Starting nextcloud installation" max_retries=10 try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" do echo "Retrying install..." try=$((try+1)) diff --git a/27/fpm/entrypoint.sh b/27/fpm/entrypoint.sh index 1c60984c..4e06fcc4 100755 --- a/27/fpm/entrypoint.sh +++ b/27/fpm/entrypoint.sh @@ -225,7 +225,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP echo "Starting nextcloud installation" max_retries=10 try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" do echo "Retrying install..." try=$((try+1)) diff --git a/28/apache/entrypoint.sh b/28/apache/entrypoint.sh index 1c60984c..4e06fcc4 100755 --- a/28/apache/entrypoint.sh +++ b/28/apache/entrypoint.sh @@ -225,7 +225,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP echo "Starting nextcloud installation" max_retries=10 try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" do echo "Retrying install..." try=$((try+1)) diff --git a/28/fpm-alpine/entrypoint.sh b/28/fpm-alpine/entrypoint.sh index 1c60984c..4e06fcc4 100755 --- a/28/fpm-alpine/entrypoint.sh +++ b/28/fpm-alpine/entrypoint.sh @@ -225,7 +225,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP echo "Starting nextcloud installation" max_retries=10 try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" do echo "Retrying install..." try=$((try+1)) diff --git a/28/fpm/entrypoint.sh b/28/fpm/entrypoint.sh index 1c60984c..4e06fcc4 100755 --- a/28/fpm/entrypoint.sh +++ b/28/fpm/entrypoint.sh @@ -225,7 +225,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP echo "Starting nextcloud installation" max_retries=10 try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" do echo "Retrying install..." try=$((try+1)) diff --git a/29/apache/entrypoint.sh b/29/apache/entrypoint.sh index 1c60984c..4e06fcc4 100755 --- a/29/apache/entrypoint.sh +++ b/29/apache/entrypoint.sh @@ -225,7 +225,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP echo "Starting nextcloud installation" max_retries=10 try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" do echo "Retrying install..." try=$((try+1)) diff --git a/29/fpm-alpine/entrypoint.sh b/29/fpm-alpine/entrypoint.sh index 1c60984c..4e06fcc4 100755 --- a/29/fpm-alpine/entrypoint.sh +++ b/29/fpm-alpine/entrypoint.sh @@ -225,7 +225,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP echo "Starting nextcloud installation" max_retries=10 try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" do echo "Retrying install..." try=$((try+1)) diff --git a/29/fpm/entrypoint.sh b/29/fpm/entrypoint.sh index 1c60984c..4e06fcc4 100755 --- a/29/fpm/entrypoint.sh +++ b/29/fpm/entrypoint.sh @@ -225,7 +225,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP echo "Starting nextcloud installation" max_retries=10 try=0 - until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ] + until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" do echo "Retrying install..." try=$((try+1)) From 258cc4ee2d0c4778f67b7b82066ad22dcdb6633f Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Fri, 19 Jul 2024 01:05:00 +0000 Subject: [PATCH 073/123] Runs update.sh --- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/fpm/Dockerfile | 6 +++--- 29/apache/Dockerfile | 6 +++--- 29/fpm-alpine/Dockerfile | 6 +++--- 29/fpm/Dockerfile | 6 +++--- latest.txt | 2 +- versions.json | 12 ++++++------ 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile index 2ea543a7..c4089c5f 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.7 +ENV NEXTCLOUD_VERSION 28.0.8 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-28.0.7.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index ae4c183c..1c0df0a4 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.7 +ENV NEXTCLOUD_VERSION 28.0.8 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index 83c009ff..593beb1b 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.7 +ENV NEXTCLOUD_VERSION 28.0.8 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-28.0.7.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.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/apache/Dockerfile b/29/apache/Dockerfile index 40b7c93f..1255bafe 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 29.0.3 +ENV NEXTCLOUD_VERSION 29.0.4 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.3.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.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 995c908a..d36b0c9e 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.3 +ENV NEXTCLOUD_VERSION 29.0.4 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.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 5bba909f..8dc9a1f0 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.3 +ENV NEXTCLOUD_VERSION 29.0.4 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.3.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.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 c5f3eb7e..fad4b91c 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -29.0.3 +29.0.4 diff --git a/versions.json b/versions.json index 47c5f9b4..7174afbd 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "29": { "branch": "29", - "version": "29.0.3", - "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2.asc", + "version": "29.0.4", + "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -27,9 +27,9 @@ }, "28": { "branch": "28", - "version": "28.0.7", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2.asc", + "version": "28.0.8", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From 65138b6d22bec1ac15e2f0f125426290640bb97a Mon Sep 17 00:00:00 2001 From: J0WI Date: Sat, 20 Jul 2024 12:47:17 +0000 Subject: [PATCH 074/123] Bump stable to 29.0.4 (fix #2258) Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 12bc4a40..8eaaea3b 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='28.0.7' +stable_channel='29.0.4' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From 3677cdf9ad7b77bd2d490901a300a924b6461f4f Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Wed, 21 Aug 2024 00:28:49 +0000 Subject: [PATCH 075/123] Runs update.sh --- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/fpm/Dockerfile | 6 +++--- 29/apache/Dockerfile | 6 +++--- 29/fpm-alpine/Dockerfile | 6 +++--- 29/fpm/Dockerfile | 6 +++--- latest.txt | 2 +- versions.json | 12 ++++++------ 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile index c4089c5f..a5f90873 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.8 +ENV NEXTCLOUD_VERSION 28.0.9 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-28.0.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 1c0df0a4..c0f2ad23 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.8 +ENV NEXTCLOUD_VERSION 28.0.9 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index 593beb1b..ec28043f 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.8 +ENV NEXTCLOUD_VERSION 28.0.9 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-28.0.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.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/apache/Dockerfile b/29/apache/Dockerfile index 1255bafe..b311cfbe 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 29.0.4 +ENV NEXTCLOUD_VERSION 29.0.5 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.4.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.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 d36b0c9e..ac21a63f 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.4 +ENV NEXTCLOUD_VERSION 29.0.5 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.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 8dc9a1f0..6a11f999 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.4 +ENV NEXTCLOUD_VERSION 29.0.5 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.4.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.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 fad4b91c..c67164eb 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -29.0.4 +29.0.5 diff --git a/versions.json b/versions.json index 7174afbd..d6f0070f 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "29": { "branch": "29", - "version": "29.0.4", - "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2.asc", + "version": "29.0.5", + "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -27,9 +27,9 @@ }, "28": { "branch": "28", - "version": "28.0.8", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2.asc", + "version": "28.0.9", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From e6d024039fefe3d32ad1337ab318365259a5510c Mon Sep 17 00:00:00 2001 From: J0WI Date: Wed, 21 Aug 2024 12:19:50 +0000 Subject: [PATCH 076/123] 29.0.5 (#2281) * Bump stable to 29.0.5 Signed-off-by: J0WI * 27 EOL Signed-off-by: J0WI --------- Signed-off-by: J0WI --- 27/apache/Dockerfile | 174 ----------- .../config/apache-pretty-urls.config.php | 4 - 27/apache/config/apcu.config.php | 4 - 27/apache/config/apps.config.php | 15 - 27/apache/config/autoconfig.php | 41 --- 27/apache/config/redis.config.php | 17 - 27/apache/config/reverse-proxy.config.php | 30 -- 27/apache/config/s3.config.php | 48 --- 27/apache/config/smtp.config.php | 22 -- 27/apache/config/swift.config.php | 31 -- .../config/upgrade-disable-web.config.php | 4 - 27/apache/cron.sh | 4 - 27/apache/entrypoint.sh | 293 ------------------ 27/apache/upgrade.exclude | 6 - 27/fpm-alpine/Dockerfile | 150 --------- 27/fpm-alpine/config/apcu.config.php | 4 - 27/fpm-alpine/config/apps.config.php | 15 - 27/fpm-alpine/config/autoconfig.php | 41 --- 27/fpm-alpine/config/redis.config.php | 17 - 27/fpm-alpine/config/reverse-proxy.config.php | 30 -- 27/fpm-alpine/config/s3.config.php | 48 --- 27/fpm-alpine/config/smtp.config.php | 22 -- 27/fpm-alpine/config/swift.config.php | 31 -- .../config/upgrade-disable-web.config.php | 4 - 27/fpm-alpine/cron.sh | 4 - 27/fpm-alpine/entrypoint.sh | 293 ------------------ 27/fpm-alpine/upgrade.exclude | 6 - 27/fpm/Dockerfile | 159 ---------- 27/fpm/config/apcu.config.php | 4 - 27/fpm/config/apps.config.php | 15 - 27/fpm/config/autoconfig.php | 41 --- 27/fpm/config/redis.config.php | 17 - 27/fpm/config/reverse-proxy.config.php | 30 -- 27/fpm/config/s3.config.php | 48 --- 27/fpm/config/smtp.config.php | 22 -- 27/fpm/config/swift.config.php | 31 -- 27/fpm/config/upgrade-disable-web.config.php | 4 - 27/fpm/cron.sh | 4 - 27/fpm/entrypoint.sh | 293 ------------------ 27/fpm/upgrade.exclude | 6 - generate-stackbrew-library.sh | 2 +- update.sh | 2 +- versions.json | 26 -- 43 files changed, 2 insertions(+), 2060 deletions(-) delete mode 100644 27/apache/Dockerfile delete mode 100644 27/apache/config/apache-pretty-urls.config.php delete mode 100644 27/apache/config/apcu.config.php delete mode 100644 27/apache/config/apps.config.php delete mode 100644 27/apache/config/autoconfig.php delete mode 100644 27/apache/config/redis.config.php delete mode 100644 27/apache/config/reverse-proxy.config.php delete mode 100644 27/apache/config/s3.config.php delete mode 100644 27/apache/config/smtp.config.php delete mode 100644 27/apache/config/swift.config.php delete mode 100644 27/apache/config/upgrade-disable-web.config.php delete mode 100755 27/apache/cron.sh delete mode 100755 27/apache/entrypoint.sh delete mode 100644 27/apache/upgrade.exclude delete mode 100644 27/fpm-alpine/Dockerfile delete mode 100644 27/fpm-alpine/config/apcu.config.php delete mode 100644 27/fpm-alpine/config/apps.config.php delete mode 100644 27/fpm-alpine/config/autoconfig.php delete mode 100644 27/fpm-alpine/config/redis.config.php delete mode 100644 27/fpm-alpine/config/reverse-proxy.config.php delete mode 100644 27/fpm-alpine/config/s3.config.php delete mode 100644 27/fpm-alpine/config/smtp.config.php delete mode 100644 27/fpm-alpine/config/swift.config.php delete mode 100644 27/fpm-alpine/config/upgrade-disable-web.config.php delete mode 100755 27/fpm-alpine/cron.sh delete mode 100755 27/fpm-alpine/entrypoint.sh delete mode 100644 27/fpm-alpine/upgrade.exclude delete mode 100644 27/fpm/Dockerfile delete mode 100644 27/fpm/config/apcu.config.php delete mode 100644 27/fpm/config/apps.config.php delete mode 100644 27/fpm/config/autoconfig.php delete mode 100644 27/fpm/config/redis.config.php delete mode 100644 27/fpm/config/reverse-proxy.config.php delete mode 100644 27/fpm/config/s3.config.php delete mode 100644 27/fpm/config/smtp.config.php delete mode 100644 27/fpm/config/swift.config.php delete mode 100644 27/fpm/config/upgrade-disable-web.config.php delete mode 100755 27/fpm/cron.sh delete mode 100755 27/fpm/entrypoint.sh delete mode 100644 27/fpm/upgrade.exclude diff --git a/27/apache/Dockerfile b/27/apache/Dockerfile deleted file mode 100644 index 10b2e00f..00000000 --- a/27/apache/Dockerfile +++ /dev/null @@ -1,174 +0,0 @@ -# DO NOT EDIT: created by update.sh from Dockerfile-debian.template -FROM php:8.2-apache-bookworm - -# entrypoint.sh and cron.sh dependencies -RUN set -ex; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - busybox-static \ - bzip2 \ - libldap-common \ - libmagickcore-6.q16-6-extra \ - rsync \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - mkdir -p /var/spool/cron/crontabs; \ - echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data - -# install the PHP extensions we need -# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html -ENV PHP_MEMORY_LIMIT 512M -ENV PHP_UPLOAD_LIMIT 512M -RUN set -ex; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - libcurl4-openssl-dev \ - libevent-dev \ - libfreetype6-dev \ - libgmp-dev \ - libicu-dev \ - libjpeg-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libpq-dev \ - libwebp-dev \ - libxml2-dev \ - libzip-dev \ - ; \ - \ - debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ - docker-php-ext-configure ftp --with-openssl-dir=/usr; \ - docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ - docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ - docker-php-ext-install -j "$(nproc)" \ - bcmath \ - exif \ - ftp \ - gd \ - gmp \ - intl \ - ldap \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - sysvsem \ - zip \ - ; \ - \ -# pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ - pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ - \ - docker-php-ext-enable \ - apcu \ - imagick \ - memcached \ - redis \ - ; \ - rm -r /tmp/pear; \ - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark; \ - ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -rt apt-mark manual; \ - \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/* - -# set recommended PHP.ini settings -# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache -RUN { \ - echo 'opcache.enable=1'; \ - echo 'opcache.interned_strings_buffer=32'; \ - echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.save_comments=1'; \ - echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.jit=1255'; \ - echo 'opcache.jit_buffer_size=128M'; \ - } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ - \ - echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ - \ - { \ - echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ - echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ - echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ - \ - mkdir /var/www/data; \ - mkdir -p /docker-entrypoint-hooks.d/pre-installation \ - /docker-entrypoint-hooks.d/post-installation \ - /docker-entrypoint-hooks.d/pre-upgrade \ - /docker-entrypoint-hooks.d/post-upgrade \ - /docker-entrypoint-hooks.d/before-starting; \ - chown -R www-data:root /var/www; \ - chmod -R g=u /var/www - -VOLUME /var/www/html - -RUN a2enmod headers rewrite remoteip ; \ - { \ - echo 'RemoteIPHeader X-Real-IP'; \ - echo 'RemoteIPInternalProxy 10.0.0.0/8'; \ - echo 'RemoteIPInternalProxy 172.16.0.0/12'; \ - echo 'RemoteIPInternalProxy 192.168.0.0/16'; \ - } > /etc/apache2/conf-available/remoteip.conf; \ - a2enconf remoteip - -# set apache config LimitRequestBody -ENV APACHE_BODY_LIMIT 1073741824 -RUN { \ - echo 'LimitRequestBody ${APACHE_BODY_LIMIT}'; \ - } > /etc/apache2/conf-available/apache-limits.conf; \ - a2enconf apache-limits - -ENV NEXTCLOUD_VERSION 27.1.11 - -RUN set -ex; \ - fetchDeps=" \ - gnupg \ - dirmngr \ - "; \ - apt-get update; \ - apt-get install -y --no-install-recommends $fetchDeps; \ - \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.tar.bz2.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ -# gpg key from https://nextcloud.com/nextcloud.asc - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ - gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ - gpgconf --kill all; \ - rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ - mkdir -p /usr/src/nextcloud/data; \ - 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; \ - rm -rf /var/lib/apt/lists/* - -COPY *.sh upgrade.exclude / -COPY config/* /usr/src/nextcloud/config/ - -ENTRYPOINT ["/entrypoint.sh"] -CMD ["apache2-foreground"] diff --git a/27/apache/config/apache-pretty-urls.config.php b/27/apache/config/apache-pretty-urls.config.php deleted file mode 100644 index 72da1d8c..00000000 --- a/27/apache/config/apache-pretty-urls.config.php +++ /dev/null @@ -1,4 +0,0 @@ - '/', -); diff --git a/27/apache/config/apcu.config.php b/27/apache/config/apcu.config.php deleted file mode 100644 index 69fed876..00000000 --- a/27/apache/config/apcu.config.php +++ /dev/null @@ -1,4 +0,0 @@ - '\OC\Memcache\APCu', -); diff --git a/27/apache/config/apps.config.php b/27/apache/config/apps.config.php deleted file mode 100644 index 4c37f72a..00000000 --- a/27/apache/config/apps.config.php +++ /dev/null @@ -1,15 +0,0 @@ - array ( - 0 => array ( - 'path' => OC::$SERVERROOT.'/apps', - 'url' => '/apps', - 'writable' => false, - ), - 1 => array ( - 'path' => OC::$SERVERROOT.'/custom_apps', - 'url' => '/custom_apps', - 'writable' => true, - ), - ), -); diff --git a/27/apache/config/autoconfig.php b/27/apache/config/autoconfig.php deleted file mode 100644 index 92ad2a1c..00000000 --- a/27/apache/config/autoconfig.php +++ /dev/null @@ -1,41 +0,0 @@ - '\OC\Memcache\Redis', - 'memcache.locking' => '\OC\Memcache\Redis', - 'redis' => array( - 'host' => getenv('REDIS_HOST'), - 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), - ), - ); - - if (getenv('REDIS_HOST_PORT') !== false) { - $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); - } elseif (getenv('REDIS_HOST')[0] != '/') { - $CONFIG['redis']['port'] = 6379; - } -} diff --git a/27/apache/config/reverse-proxy.config.php b/27/apache/config/reverse-proxy.config.php deleted file mode 100644 index 7df0415e..00000000 --- a/27/apache/config/reverse-proxy.config.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'class' => '\OC\Files\ObjectStore\S3', - 'arguments' => array( - 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), - 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', - 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', - 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', - 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', - 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, - // required for some non Amazon S3 implementations - 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', - // required for older protocol versions - 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' - ) - ) - ); - - if (getenv('OBJECTSTORE_S3_KEY_FILE')) { - $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_KEY')) { - $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); - } else { - $CONFIG['objectstore']['arguments']['key'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { - $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SECRET')) { - $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); - } else { - $CONFIG['objectstore']['arguments']['secret'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { - $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { - $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); - } -} diff --git a/27/apache/config/smtp.config.php b/27/apache/config/smtp.config.php deleted file mode 100644 index 66a2ef7e..00000000 --- a/27/apache/config/smtp.config.php +++ /dev/null @@ -1,22 +0,0 @@ - 'smtp', - 'mail_smtphost' => getenv('SMTP_HOST'), - 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), - 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), - 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', - 'mail_smtpname' => getenv('SMTP_NAME') ?: '', - 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), - 'mail_domain' => getenv('MAIL_DOMAIN'), - ); - - if (getenv('SMTP_PASSWORD_FILE')) { - $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); - } elseif (getenv('SMTP_PASSWORD')) { - $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); - } else { - $CONFIG['mail_smtppassword'] = ''; - } -} diff --git a/27/apache/config/swift.config.php b/27/apache/config/swift.config.php deleted file mode 100644 index 47ada566..00000000 --- a/27/apache/config/swift.config.php +++ /dev/null @@ -1,31 +0,0 @@ - [ - 'class' => 'OC\\Files\\ObjectStore\\Swift', - 'arguments' => [ - 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', - 'user' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), - 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', - ], - ], - 'scope' => [ - 'project' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', - ], - ], - ], - 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', - 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), - 'url' => getenv('OBJECTSTORE_SWIFT_URL'), - 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), - ] - ] - ); -} diff --git a/27/apache/config/upgrade-disable-web.config.php b/27/apache/config/upgrade-disable-web.config.php deleted file mode 100644 index cb00b436..00000000 --- a/27/apache/config/upgrade-disable-web.config.php +++ /dev/null @@ -1,4 +0,0 @@ - true, -); diff --git a/27/apache/cron.sh b/27/apache/cron.sh deleted file mode 100755 index b4cd9af6..00000000 --- a/27/apache/cron.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -exec busybox crond -f -L /dev/stdout diff --git a/27/apache/entrypoint.sh b/27/apache/entrypoint.sh deleted file mode 100755 index 4e06fcc4..00000000 --- a/27/apache/entrypoint.sh +++ /dev/null @@ -1,293 +0,0 @@ -#!/bin/sh -set -eu - -# version_greater A B returns whether A > B -version_greater() { - [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] -} - -# return true if specified directory is empty -directory_empty() { - [ -z "$(ls -A "$1/")" ] -} - -run_as() { - if [ "$(id -u)" = 0 ]; then - su -p "$user" -s /bin/sh -c "$1" - else - sh -c "$1" - fi -} - -# Execute all executable files in a given directory in alphanumeric order -run_path() { - local hook_folder_path="/docker-entrypoint-hooks.d/$1" - local return_code=0 - - if ! [ -d "${hook_folder_path}" ]; then - echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" - return 0 - fi - - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - ( - find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do - if ! [ -x "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" - continue - fi - - echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" - - run_as "${script_file_path}" || return_code="$?" - - if [ "${return_code}" -ne "0" ]; then - echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" - exit 1 - fi - - echo "==> Finished the script: \"${script_file_path}\"" - done - ) -} - -# usage: file_env VAR [DEFAULT] -# ie: file_env 'XYZ_DB_PASSWORD' 'example' -# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of -# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) -file_env() { - local var="$1" - local fileVar="${var}_FILE" - local def="${2:-}" - local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") - local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") - if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then - echo >&2 "error: both $var and $fileVar are set (but are exclusive)" - exit 1 - fi - if [ -n "${varValue}" ]; then - export "$var"="${varValue}" - elif [ -n "${fileVarValue}" ]; then - export "$var"="$(cat "${fileVarValue}")" - elif [ -n "${def}" ]; then - export "$var"="$def" - fi - unset "$fileVar" -} - -if expr "$1" : "apache" 1>/dev/null; then - if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then - a2disconf remoteip - fi -fi - -if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then - uid="$(id -u)" - gid="$(id -g)" - if [ "$uid" = '0' ]; then - case "$1" in - apache2*) - user="${APACHE_RUN_USER:-www-data}" - group="${APACHE_RUN_GROUP:-www-data}" - - # strip off any '#' symbol ('#1000' is valid syntax for Apache) - user="${user#'#'}" - group="${group#'#'}" - ;; - *) # php-fpm - user='www-data' - group='www-data' - ;; - esac - else - user="$uid" - group="$gid" - fi - - if [ -n "${REDIS_HOST+x}" ]; then - - echo "Configuring Redis as session handler" - { - file_env REDIS_HOST_PASSWORD - echo 'session.save_handler = redis' - # check if redis host is an unix socket path - if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then - if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" - else - echo "session.save_path = \"unix://${REDIS_HOST}\"" - 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}\"" - else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" - 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. - ( - if ! flock -n 9; then - # If we couldn't get it immediately, show a message, then wait for real - echo "Another process is initializing Nextcloud. Waiting..." - flock 9 - fi - - installed_version="0.0.0.0" - if [ -f /var/www/html/version.php ]; then - # shellcheck disable=SC2016 - installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" - fi - # shellcheck disable=SC2016 - image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" - - if version_greater "$installed_version" "$image_version"; then - echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" - exit 1 - fi - - if version_greater "$image_version" "$installed_version"; then - echo "Initializing nextcloud $image_version ..." - if [ "$installed_version" != "0.0.0.0" ]; then - if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then - echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." - echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." - exit 1 - fi - echo "Upgrading nextcloud from $installed_version ..." - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before - fi - if [ "$(id -u)" = 0 ]; then - rsync_options="-rlDog --chown $user:$group" - else - rsync_options="-rlD" - fi - - rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ - for dir in config data custom_apps themes; do - if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then - rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - fi - done - rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - - # Install - if [ "$installed_version" = "0.0.0.0" ]; then - echo "New nextcloud instance" - - file_env NEXTCLOUD_ADMIN_PASSWORD - file_env NEXTCLOUD_ADMIN_USER - - install=false - if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then - # shellcheck disable=SC2016 - install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' - if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then - # shellcheck disable=SC2016 - install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' - fi - - file_env MYSQL_DATABASE - file_env MYSQL_PASSWORD - file_env MYSQL_USER - file_env POSTGRES_DB - file_env POSTGRES_PASSWORD - file_env POSTGRES_USER - - if [ -n "${SQLITE_DATABASE+x}" ]; then - echo "Installing with SQLite database" - # shellcheck disable=SC2016 - install_options=$install_options' --database-name "$SQLITE_DATABASE"' - install=true - elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then - echo "Installing with MySQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' - install=true - elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then - echo "Installing with PostgreSQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' - install=true - fi - - if [ "$install" = true ]; then - run_path pre-installation - - echo "Starting nextcloud installation" - max_retries=10 - try=0 - until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" - do - echo "Retrying install..." - try=$((try+1)) - sleep 10s - done - if [ "$try" -gt "$max_retries" ]; then - echo "Installing of nextcloud failed!" - exit 1 - fi - if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then - echo "Setting trusted domains…" - NC_TRUSTED_DOMAIN_IDX=1 - for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do - DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') - run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" - NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) - done - fi - - run_path post-installation - fi - fi - # not enough specified to do a fully automated installation - if [ "$install" = false ]; then - echo "Next step: Access your instance to finish the web-based installation!" - echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." - fi - # Upgrade - else - run_path pre-upgrade - - run_as 'php /var/www/html/occ upgrade' - - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after - echo "The following apps have been disabled:" - diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 - rm -f /tmp/list_before /tmp/list_after - - run_path post-upgrade - fi - - echo "Initializing finished" - fi - - # Update htaccess after init if requested - if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then - run_as 'php /var/www/html/occ maintenance:update:htaccess' - fi - ) 9> /var/www/html/nextcloud-init-sync.lock - - # warn if config files on persistent storage differ from the latest version of this image - for cfgPath in /usr/src/nextcloud/config/*.php; do - cfgFile=$(basename "$cfgPath") - - if [ "$cfgFile" != "config.sample.php" ]; then - if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then - echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" - fi - fi - done - - run_path before-starting -fi - -exec "$@" diff --git a/27/apache/upgrade.exclude b/27/apache/upgrade.exclude deleted file mode 100644 index 31ce39a8..00000000 --- a/27/apache/upgrade.exclude +++ /dev/null @@ -1,6 +0,0 @@ -/config/ -/data/ -/custom_apps/ -/themes/ -/version.php -/nextcloud-init-sync.lock diff --git a/27/fpm-alpine/Dockerfile b/27/fpm-alpine/Dockerfile deleted file mode 100644 index 3f9ebe65..00000000 --- a/27/fpm-alpine/Dockerfile +++ /dev/null @@ -1,150 +0,0 @@ -# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template -FROM php:8.2-fpm-alpine3.20 - -# entrypoint.sh and cron.sh dependencies -RUN set -ex; \ - \ - apk add --no-cache \ - imagemagick \ - imagemagick-pdf \ - imagemagick-jpeg \ - imagemagick-raw \ - imagemagick-tiff \ - imagemagick-heic \ - imagemagick-webp \ - imagemagick-svg \ - rsync \ - ; \ - \ - rm /var/spool/cron/crontabs/root; \ - echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data - -# install the PHP extensions we need -# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html -RUN set -ex; \ - \ - apk add --no-cache --virtual .build-deps \ - $PHPIZE_DEPS \ - autoconf \ - freetype-dev \ - gmp-dev \ - icu-dev \ - imagemagick-dev \ - libevent-dev \ - libjpeg-turbo-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libwebp-dev \ - libxml2-dev \ - libzip-dev \ - openldap-dev \ - pcre-dev \ - postgresql-dev \ - ; \ - \ - docker-php-ext-configure ftp --with-openssl-dir=/usr; \ - docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ - docker-php-ext-configure ldap; \ - docker-php-ext-install -j "$(nproc)" \ - bcmath \ - exif \ - ftp \ - gd \ - gmp \ - intl \ - ldap \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - sysvsem \ - zip \ - ; \ - \ -# pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ - pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ - \ - docker-php-ext-enable \ - apcu \ - imagick \ - memcached \ - redis \ - ; \ - rm -r /tmp/pear; \ - \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .nextcloud-phpext-rundeps $runDeps; \ - apk del --no-network .build-deps - -# set recommended PHP.ini settings -# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache -ENV PHP_MEMORY_LIMIT 512M -ENV PHP_UPLOAD_LIMIT 512M -RUN { \ - echo 'opcache.enable=1'; \ - echo 'opcache.interned_strings_buffer=32'; \ - echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.save_comments=1'; \ - echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.jit=1255'; \ - echo 'opcache.jit_buffer_size=128M'; \ - } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ - \ - echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ - \ - { \ - echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ - echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ - echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ - \ - mkdir /var/www/data; \ - mkdir -p /docker-entrypoint-hooks.d/pre-installation \ - /docker-entrypoint-hooks.d/post-installation \ - /docker-entrypoint-hooks.d/pre-upgrade \ - /docker-entrypoint-hooks.d/post-upgrade \ - /docker-entrypoint-hooks.d/before-starting; \ - chown -R www-data:root /var/www; \ - chmod -R g=u /var/www - -VOLUME /var/www/html - - -ENV NEXTCLOUD_VERSION 27.1.11 - -RUN set -ex; \ - apk add --no-cache --virtual .fetch-deps \ - bzip2 \ - gnupg \ - ; \ - \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.tar.bz2.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ -# gpg key from https://nextcloud.com/nextcloud.asc - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ - gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ - gpgconf --kill all; \ - rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ - mkdir -p /usr/src/nextcloud/data; \ - mkdir -p /usr/src/nextcloud/custom_apps; \ - chmod +x /usr/src/nextcloud/occ; \ - apk del --no-network .fetch-deps - -COPY *.sh upgrade.exclude / -COPY config/* /usr/src/nextcloud/config/ - -ENTRYPOINT ["/entrypoint.sh"] -CMD ["php-fpm"] diff --git a/27/fpm-alpine/config/apcu.config.php b/27/fpm-alpine/config/apcu.config.php deleted file mode 100644 index 69fed876..00000000 --- a/27/fpm-alpine/config/apcu.config.php +++ /dev/null @@ -1,4 +0,0 @@ - '\OC\Memcache\APCu', -); diff --git a/27/fpm-alpine/config/apps.config.php b/27/fpm-alpine/config/apps.config.php deleted file mode 100644 index 4c37f72a..00000000 --- a/27/fpm-alpine/config/apps.config.php +++ /dev/null @@ -1,15 +0,0 @@ - array ( - 0 => array ( - 'path' => OC::$SERVERROOT.'/apps', - 'url' => '/apps', - 'writable' => false, - ), - 1 => array ( - 'path' => OC::$SERVERROOT.'/custom_apps', - 'url' => '/custom_apps', - 'writable' => true, - ), - ), -); diff --git a/27/fpm-alpine/config/autoconfig.php b/27/fpm-alpine/config/autoconfig.php deleted file mode 100644 index 92ad2a1c..00000000 --- a/27/fpm-alpine/config/autoconfig.php +++ /dev/null @@ -1,41 +0,0 @@ - '\OC\Memcache\Redis', - 'memcache.locking' => '\OC\Memcache\Redis', - 'redis' => array( - 'host' => getenv('REDIS_HOST'), - 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), - ), - ); - - if (getenv('REDIS_HOST_PORT') !== false) { - $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); - } elseif (getenv('REDIS_HOST')[0] != '/') { - $CONFIG['redis']['port'] = 6379; - } -} diff --git a/27/fpm-alpine/config/reverse-proxy.config.php b/27/fpm-alpine/config/reverse-proxy.config.php deleted file mode 100644 index 7df0415e..00000000 --- a/27/fpm-alpine/config/reverse-proxy.config.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'class' => '\OC\Files\ObjectStore\S3', - 'arguments' => array( - 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), - 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', - 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', - 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', - 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', - 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, - // required for some non Amazon S3 implementations - 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', - // required for older protocol versions - 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' - ) - ) - ); - - if (getenv('OBJECTSTORE_S3_KEY_FILE')) { - $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_KEY')) { - $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); - } else { - $CONFIG['objectstore']['arguments']['key'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { - $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SECRET')) { - $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); - } else { - $CONFIG['objectstore']['arguments']['secret'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { - $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { - $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); - } -} diff --git a/27/fpm-alpine/config/smtp.config.php b/27/fpm-alpine/config/smtp.config.php deleted file mode 100644 index 66a2ef7e..00000000 --- a/27/fpm-alpine/config/smtp.config.php +++ /dev/null @@ -1,22 +0,0 @@ - 'smtp', - 'mail_smtphost' => getenv('SMTP_HOST'), - 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), - 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), - 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', - 'mail_smtpname' => getenv('SMTP_NAME') ?: '', - 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), - 'mail_domain' => getenv('MAIL_DOMAIN'), - ); - - if (getenv('SMTP_PASSWORD_FILE')) { - $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); - } elseif (getenv('SMTP_PASSWORD')) { - $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); - } else { - $CONFIG['mail_smtppassword'] = ''; - } -} diff --git a/27/fpm-alpine/config/swift.config.php b/27/fpm-alpine/config/swift.config.php deleted file mode 100644 index 47ada566..00000000 --- a/27/fpm-alpine/config/swift.config.php +++ /dev/null @@ -1,31 +0,0 @@ - [ - 'class' => 'OC\\Files\\ObjectStore\\Swift', - 'arguments' => [ - 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', - 'user' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), - 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', - ], - ], - 'scope' => [ - 'project' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', - ], - ], - ], - 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', - 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), - 'url' => getenv('OBJECTSTORE_SWIFT_URL'), - 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), - ] - ] - ); -} diff --git a/27/fpm-alpine/config/upgrade-disable-web.config.php b/27/fpm-alpine/config/upgrade-disable-web.config.php deleted file mode 100644 index cb00b436..00000000 --- a/27/fpm-alpine/config/upgrade-disable-web.config.php +++ /dev/null @@ -1,4 +0,0 @@ - true, -); diff --git a/27/fpm-alpine/cron.sh b/27/fpm-alpine/cron.sh deleted file mode 100755 index b4cd9af6..00000000 --- a/27/fpm-alpine/cron.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -exec busybox crond -f -L /dev/stdout diff --git a/27/fpm-alpine/entrypoint.sh b/27/fpm-alpine/entrypoint.sh deleted file mode 100755 index 4e06fcc4..00000000 --- a/27/fpm-alpine/entrypoint.sh +++ /dev/null @@ -1,293 +0,0 @@ -#!/bin/sh -set -eu - -# version_greater A B returns whether A > B -version_greater() { - [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] -} - -# return true if specified directory is empty -directory_empty() { - [ -z "$(ls -A "$1/")" ] -} - -run_as() { - if [ "$(id -u)" = 0 ]; then - su -p "$user" -s /bin/sh -c "$1" - else - sh -c "$1" - fi -} - -# Execute all executable files in a given directory in alphanumeric order -run_path() { - local hook_folder_path="/docker-entrypoint-hooks.d/$1" - local return_code=0 - - if ! [ -d "${hook_folder_path}" ]; then - echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" - return 0 - fi - - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - ( - find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do - if ! [ -x "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" - continue - fi - - echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" - - run_as "${script_file_path}" || return_code="$?" - - if [ "${return_code}" -ne "0" ]; then - echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" - exit 1 - fi - - echo "==> Finished the script: \"${script_file_path}\"" - done - ) -} - -# usage: file_env VAR [DEFAULT] -# ie: file_env 'XYZ_DB_PASSWORD' 'example' -# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of -# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) -file_env() { - local var="$1" - local fileVar="${var}_FILE" - local def="${2:-}" - local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") - local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") - if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then - echo >&2 "error: both $var and $fileVar are set (but are exclusive)" - exit 1 - fi - if [ -n "${varValue}" ]; then - export "$var"="${varValue}" - elif [ -n "${fileVarValue}" ]; then - export "$var"="$(cat "${fileVarValue}")" - elif [ -n "${def}" ]; then - export "$var"="$def" - fi - unset "$fileVar" -} - -if expr "$1" : "apache" 1>/dev/null; then - if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then - a2disconf remoteip - fi -fi - -if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then - uid="$(id -u)" - gid="$(id -g)" - if [ "$uid" = '0' ]; then - case "$1" in - apache2*) - user="${APACHE_RUN_USER:-www-data}" - group="${APACHE_RUN_GROUP:-www-data}" - - # strip off any '#' symbol ('#1000' is valid syntax for Apache) - user="${user#'#'}" - group="${group#'#'}" - ;; - *) # php-fpm - user='www-data' - group='www-data' - ;; - esac - else - user="$uid" - group="$gid" - fi - - if [ -n "${REDIS_HOST+x}" ]; then - - echo "Configuring Redis as session handler" - { - file_env REDIS_HOST_PASSWORD - echo 'session.save_handler = redis' - # check if redis host is an unix socket path - if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then - if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" - else - echo "session.save_path = \"unix://${REDIS_HOST}\"" - 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}\"" - else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" - 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. - ( - if ! flock -n 9; then - # If we couldn't get it immediately, show a message, then wait for real - echo "Another process is initializing Nextcloud. Waiting..." - flock 9 - fi - - installed_version="0.0.0.0" - if [ -f /var/www/html/version.php ]; then - # shellcheck disable=SC2016 - installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" - fi - # shellcheck disable=SC2016 - image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" - - if version_greater "$installed_version" "$image_version"; then - echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" - exit 1 - fi - - if version_greater "$image_version" "$installed_version"; then - echo "Initializing nextcloud $image_version ..." - if [ "$installed_version" != "0.0.0.0" ]; then - if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then - echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." - echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." - exit 1 - fi - echo "Upgrading nextcloud from $installed_version ..." - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before - fi - if [ "$(id -u)" = 0 ]; then - rsync_options="-rlDog --chown $user:$group" - else - rsync_options="-rlD" - fi - - rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ - for dir in config data custom_apps themes; do - if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then - rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - fi - done - rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - - # Install - if [ "$installed_version" = "0.0.0.0" ]; then - echo "New nextcloud instance" - - file_env NEXTCLOUD_ADMIN_PASSWORD - file_env NEXTCLOUD_ADMIN_USER - - install=false - if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then - # shellcheck disable=SC2016 - install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' - if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then - # shellcheck disable=SC2016 - install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' - fi - - file_env MYSQL_DATABASE - file_env MYSQL_PASSWORD - file_env MYSQL_USER - file_env POSTGRES_DB - file_env POSTGRES_PASSWORD - file_env POSTGRES_USER - - if [ -n "${SQLITE_DATABASE+x}" ]; then - echo "Installing with SQLite database" - # shellcheck disable=SC2016 - install_options=$install_options' --database-name "$SQLITE_DATABASE"' - install=true - elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then - echo "Installing with MySQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' - install=true - elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then - echo "Installing with PostgreSQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' - install=true - fi - - if [ "$install" = true ]; then - run_path pre-installation - - echo "Starting nextcloud installation" - max_retries=10 - try=0 - until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" - do - echo "Retrying install..." - try=$((try+1)) - sleep 10s - done - if [ "$try" -gt "$max_retries" ]; then - echo "Installing of nextcloud failed!" - exit 1 - fi - if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then - echo "Setting trusted domains…" - NC_TRUSTED_DOMAIN_IDX=1 - for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do - DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') - run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" - NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) - done - fi - - run_path post-installation - fi - fi - # not enough specified to do a fully automated installation - if [ "$install" = false ]; then - echo "Next step: Access your instance to finish the web-based installation!" - echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." - fi - # Upgrade - else - run_path pre-upgrade - - run_as 'php /var/www/html/occ upgrade' - - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after - echo "The following apps have been disabled:" - diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 - rm -f /tmp/list_before /tmp/list_after - - run_path post-upgrade - fi - - echo "Initializing finished" - fi - - # Update htaccess after init if requested - if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then - run_as 'php /var/www/html/occ maintenance:update:htaccess' - fi - ) 9> /var/www/html/nextcloud-init-sync.lock - - # warn if config files on persistent storage differ from the latest version of this image - for cfgPath in /usr/src/nextcloud/config/*.php; do - cfgFile=$(basename "$cfgPath") - - if [ "$cfgFile" != "config.sample.php" ]; then - if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then - echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" - fi - fi - done - - run_path before-starting -fi - -exec "$@" diff --git a/27/fpm-alpine/upgrade.exclude b/27/fpm-alpine/upgrade.exclude deleted file mode 100644 index 31ce39a8..00000000 --- a/27/fpm-alpine/upgrade.exclude +++ /dev/null @@ -1,6 +0,0 @@ -/config/ -/data/ -/custom_apps/ -/themes/ -/version.php -/nextcloud-init-sync.lock diff --git a/27/fpm/Dockerfile b/27/fpm/Dockerfile deleted file mode 100644 index 8602fcca..00000000 --- a/27/fpm/Dockerfile +++ /dev/null @@ -1,159 +0,0 @@ -# DO NOT EDIT: created by update.sh from Dockerfile-debian.template -FROM php:8.2-fpm-bookworm - -# entrypoint.sh and cron.sh dependencies -RUN set -ex; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - busybox-static \ - bzip2 \ - libldap-common \ - libmagickcore-6.q16-6-extra \ - rsync \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - mkdir -p /var/spool/cron/crontabs; \ - echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data - -# install the PHP extensions we need -# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html -ENV PHP_MEMORY_LIMIT 512M -ENV PHP_UPLOAD_LIMIT 512M -RUN set -ex; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - libcurl4-openssl-dev \ - libevent-dev \ - libfreetype6-dev \ - libgmp-dev \ - libicu-dev \ - libjpeg-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng-dev \ - libpq-dev \ - libwebp-dev \ - libxml2-dev \ - libzip-dev \ - ; \ - \ - debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ - docker-php-ext-configure ftp --with-openssl-dir=/usr; \ - docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ - docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ - docker-php-ext-install -j "$(nproc)" \ - bcmath \ - exif \ - ftp \ - gd \ - gmp \ - intl \ - ldap \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - sysvsem \ - zip \ - ; \ - \ -# pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ - pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ - \ - docker-php-ext-enable \ - apcu \ - imagick \ - memcached \ - redis \ - ; \ - rm -r /tmp/pear; \ - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark; \ - ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -rt apt-mark manual; \ - \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/* - -# set recommended PHP.ini settings -# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache -RUN { \ - echo 'opcache.enable=1'; \ - echo 'opcache.interned_strings_buffer=32'; \ - echo 'opcache.max_accelerated_files=10000'; \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.save_comments=1'; \ - echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.jit=1255'; \ - echo 'opcache.jit_buffer_size=128M'; \ - } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ - \ - echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ - \ - { \ - echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ - echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ - echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ - } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ - \ - mkdir /var/www/data; \ - mkdir -p /docker-entrypoint-hooks.d/pre-installation \ - /docker-entrypoint-hooks.d/post-installation \ - /docker-entrypoint-hooks.d/pre-upgrade \ - /docker-entrypoint-hooks.d/post-upgrade \ - /docker-entrypoint-hooks.d/before-starting; \ - chown -R www-data:root /var/www; \ - chmod -R g=u /var/www - -VOLUME /var/www/html - - -ENV NEXTCLOUD_VERSION 27.1.11 - -RUN set -ex; \ - fetchDeps=" \ - gnupg \ - dirmngr \ - "; \ - apt-get update; \ - apt-get install -y --no-install-recommends $fetchDeps; \ - \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.tar.bz2.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ -# gpg key from https://nextcloud.com/nextcloud.asc - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ - gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ - gpgconf --kill all; \ - rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ - rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ - mkdir -p /usr/src/nextcloud/data; \ - 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; \ - rm -rf /var/lib/apt/lists/* - -COPY *.sh upgrade.exclude / -COPY config/* /usr/src/nextcloud/config/ - -ENTRYPOINT ["/entrypoint.sh"] -CMD ["php-fpm"] diff --git a/27/fpm/config/apcu.config.php b/27/fpm/config/apcu.config.php deleted file mode 100644 index 69fed876..00000000 --- a/27/fpm/config/apcu.config.php +++ /dev/null @@ -1,4 +0,0 @@ - '\OC\Memcache\APCu', -); diff --git a/27/fpm/config/apps.config.php b/27/fpm/config/apps.config.php deleted file mode 100644 index 4c37f72a..00000000 --- a/27/fpm/config/apps.config.php +++ /dev/null @@ -1,15 +0,0 @@ - array ( - 0 => array ( - 'path' => OC::$SERVERROOT.'/apps', - 'url' => '/apps', - 'writable' => false, - ), - 1 => array ( - 'path' => OC::$SERVERROOT.'/custom_apps', - 'url' => '/custom_apps', - 'writable' => true, - ), - ), -); diff --git a/27/fpm/config/autoconfig.php b/27/fpm/config/autoconfig.php deleted file mode 100644 index 92ad2a1c..00000000 --- a/27/fpm/config/autoconfig.php +++ /dev/null @@ -1,41 +0,0 @@ - '\OC\Memcache\Redis', - 'memcache.locking' => '\OC\Memcache\Redis', - 'redis' => array( - 'host' => getenv('REDIS_HOST'), - 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), - ), - ); - - if (getenv('REDIS_HOST_PORT') !== false) { - $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); - } elseif (getenv('REDIS_HOST')[0] != '/') { - $CONFIG['redis']['port'] = 6379; - } -} diff --git a/27/fpm/config/reverse-proxy.config.php b/27/fpm/config/reverse-proxy.config.php deleted file mode 100644 index 7df0415e..00000000 --- a/27/fpm/config/reverse-proxy.config.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'class' => '\OC\Files\ObjectStore\S3', - 'arguments' => array( - 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), - 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', - 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', - 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', - 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', - 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, - // required for some non Amazon S3 implementations - 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', - // required for older protocol versions - 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' - ) - ) - ); - - if (getenv('OBJECTSTORE_S3_KEY_FILE')) { - $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_KEY')) { - $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); - } else { - $CONFIG['objectstore']['arguments']['key'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { - $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SECRET')) { - $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); - } else { - $CONFIG['objectstore']['arguments']['secret'] = ''; - } - - if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { - $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); - } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { - $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); - } -} diff --git a/27/fpm/config/smtp.config.php b/27/fpm/config/smtp.config.php deleted file mode 100644 index 66a2ef7e..00000000 --- a/27/fpm/config/smtp.config.php +++ /dev/null @@ -1,22 +0,0 @@ - 'smtp', - 'mail_smtphost' => getenv('SMTP_HOST'), - 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), - 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', - 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), - 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', - 'mail_smtpname' => getenv('SMTP_NAME') ?: '', - 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), - 'mail_domain' => getenv('MAIL_DOMAIN'), - ); - - if (getenv('SMTP_PASSWORD_FILE')) { - $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); - } elseif (getenv('SMTP_PASSWORD')) { - $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); - } else { - $CONFIG['mail_smtppassword'] = ''; - } -} diff --git a/27/fpm/config/swift.config.php b/27/fpm/config/swift.config.php deleted file mode 100644 index 47ada566..00000000 --- a/27/fpm/config/swift.config.php +++ /dev/null @@ -1,31 +0,0 @@ - [ - 'class' => 'OC\\Files\\ObjectStore\\Swift', - 'arguments' => [ - 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', - 'user' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), - 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', - ], - ], - 'scope' => [ - 'project' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', - ], - ], - ], - 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', - 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), - 'url' => getenv('OBJECTSTORE_SWIFT_URL'), - 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), - ] - ] - ); -} diff --git a/27/fpm/config/upgrade-disable-web.config.php b/27/fpm/config/upgrade-disable-web.config.php deleted file mode 100644 index cb00b436..00000000 --- a/27/fpm/config/upgrade-disable-web.config.php +++ /dev/null @@ -1,4 +0,0 @@ - true, -); diff --git a/27/fpm/cron.sh b/27/fpm/cron.sh deleted file mode 100755 index b4cd9af6..00000000 --- a/27/fpm/cron.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -exec busybox crond -f -L /dev/stdout diff --git a/27/fpm/entrypoint.sh b/27/fpm/entrypoint.sh deleted file mode 100755 index 4e06fcc4..00000000 --- a/27/fpm/entrypoint.sh +++ /dev/null @@ -1,293 +0,0 @@ -#!/bin/sh -set -eu - -# version_greater A B returns whether A > B -version_greater() { - [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] -} - -# return true if specified directory is empty -directory_empty() { - [ -z "$(ls -A "$1/")" ] -} - -run_as() { - if [ "$(id -u)" = 0 ]; then - su -p "$user" -s /bin/sh -c "$1" - else - sh -c "$1" - fi -} - -# Execute all executable files in a given directory in alphanumeric order -run_path() { - local hook_folder_path="/docker-entrypoint-hooks.d/$1" - local return_code=0 - - if ! [ -d "${hook_folder_path}" ]; then - echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" - return 0 - fi - - echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" - - ( - find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do - if ! [ -x "${script_file_path}" ]; then - echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" - continue - fi - - echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" - - run_as "${script_file_path}" || return_code="$?" - - if [ "${return_code}" -ne "0" ]; then - echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" - exit 1 - fi - - echo "==> Finished the script: \"${script_file_path}\"" - done - ) -} - -# usage: file_env VAR [DEFAULT] -# ie: file_env 'XYZ_DB_PASSWORD' 'example' -# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of -# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) -file_env() { - local var="$1" - local fileVar="${var}_FILE" - local def="${2:-}" - local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") - local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") - if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then - echo >&2 "error: both $var and $fileVar are set (but are exclusive)" - exit 1 - fi - if [ -n "${varValue}" ]; then - export "$var"="${varValue}" - elif [ -n "${fileVarValue}" ]; then - export "$var"="$(cat "${fileVarValue}")" - elif [ -n "${def}" ]; then - export "$var"="$def" - fi - unset "$fileVar" -} - -if expr "$1" : "apache" 1>/dev/null; then - if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then - a2disconf remoteip - fi -fi - -if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then - uid="$(id -u)" - gid="$(id -g)" - if [ "$uid" = '0' ]; then - case "$1" in - apache2*) - user="${APACHE_RUN_USER:-www-data}" - group="${APACHE_RUN_GROUP:-www-data}" - - # strip off any '#' symbol ('#1000' is valid syntax for Apache) - user="${user#'#'}" - group="${group#'#'}" - ;; - *) # php-fpm - user='www-data' - group='www-data' - ;; - esac - else - user="$uid" - group="$gid" - fi - - if [ -n "${REDIS_HOST+x}" ]; then - - echo "Configuring Redis as session handler" - { - file_env REDIS_HOST_PASSWORD - echo 'session.save_handler = redis' - # check if redis host is an unix socket path - if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then - if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then - echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" - else - echo "session.save_path = \"unix://${REDIS_HOST}\"" - 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}\"" - else - echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" - 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. - ( - if ! flock -n 9; then - # If we couldn't get it immediately, show a message, then wait for real - echo "Another process is initializing Nextcloud. Waiting..." - flock 9 - fi - - installed_version="0.0.0.0" - if [ -f /var/www/html/version.php ]; then - # shellcheck disable=SC2016 - installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" - fi - # shellcheck disable=SC2016 - image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" - - if version_greater "$installed_version" "$image_version"; then - echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" - exit 1 - fi - - if version_greater "$image_version" "$installed_version"; then - echo "Initializing nextcloud $image_version ..." - if [ "$installed_version" != "0.0.0.0" ]; then - if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then - echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." - echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." - exit 1 - fi - echo "Upgrading nextcloud from $installed_version ..." - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before - fi - if [ "$(id -u)" = 0 ]; then - rsync_options="-rlDog --chown $user:$group" - else - rsync_options="-rlD" - fi - - rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ - for dir in config data custom_apps themes; do - if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then - rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - fi - done - rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ - - # Install - if [ "$installed_version" = "0.0.0.0" ]; then - echo "New nextcloud instance" - - file_env NEXTCLOUD_ADMIN_PASSWORD - file_env NEXTCLOUD_ADMIN_USER - - install=false - if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then - # shellcheck disable=SC2016 - install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' - if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then - # shellcheck disable=SC2016 - install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' - fi - - file_env MYSQL_DATABASE - file_env MYSQL_PASSWORD - file_env MYSQL_USER - file_env POSTGRES_DB - file_env POSTGRES_PASSWORD - file_env POSTGRES_USER - - if [ -n "${SQLITE_DATABASE+x}" ]; then - echo "Installing with SQLite database" - # shellcheck disable=SC2016 - install_options=$install_options' --database-name "$SQLITE_DATABASE"' - install=true - elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then - echo "Installing with MySQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' - install=true - elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then - echo "Installing with PostgreSQL database" - # shellcheck disable=SC2016 - install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' - install=true - fi - - if [ "$install" = true ]; then - run_path pre-installation - - echo "Starting nextcloud installation" - max_retries=10 - try=0 - until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" - do - echo "Retrying install..." - try=$((try+1)) - sleep 10s - done - if [ "$try" -gt "$max_retries" ]; then - echo "Installing of nextcloud failed!" - exit 1 - fi - if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then - echo "Setting trusted domains…" - NC_TRUSTED_DOMAIN_IDX=1 - for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do - DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') - run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" - NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) - done - fi - - run_path post-installation - fi - fi - # not enough specified to do a fully automated installation - if [ "$install" = false ]; then - echo "Next step: Access your instance to finish the web-based installation!" - echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." - fi - # Upgrade - else - run_path pre-upgrade - - run_as 'php /var/www/html/occ upgrade' - - run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after - echo "The following apps have been disabled:" - diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 - rm -f /tmp/list_before /tmp/list_after - - run_path post-upgrade - fi - - echo "Initializing finished" - fi - - # Update htaccess after init if requested - if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then - run_as 'php /var/www/html/occ maintenance:update:htaccess' - fi - ) 9> /var/www/html/nextcloud-init-sync.lock - - # warn if config files on persistent storage differ from the latest version of this image - for cfgPath in /usr/src/nextcloud/config/*.php; do - cfgFile=$(basename "$cfgPath") - - if [ "$cfgFile" != "config.sample.php" ]; then - if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then - echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" - fi - fi - done - - run_path before-starting -fi - -exec "$@" diff --git a/27/fpm/upgrade.exclude b/27/fpm/upgrade.exclude deleted file mode 100644 index 31ce39a8..00000000 --- a/27/fpm/upgrade.exclude +++ /dev/null @@ -1,6 +0,0 @@ -/config/ -/data/ -/custom_apps/ -/themes/ -/version.php -/nextcloud-init-sync.lock diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 8eaaea3b..ab043083 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='29.0.4' +stable_channel='29.0.5' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" diff --git a/update.sh b/update.sh index bc35ce19..6e576238 100755 --- a/update.sh +++ b/update.sh @@ -84,7 +84,7 @@ variants=( fpm-alpine ) -min_version='27' +min_version='28' # version_greater_or_equal A B returns whether A >= B function version_greater_or_equal() { diff --git a/versions.json b/versions.json index d6f0070f..e97ea0e6 100644 --- a/versions.json +++ b/versions.json @@ -50,31 +50,5 @@ "phpVersion": "8.2" } } - }, - "27": { - "branch": "27", - "version": "27.1.11", - "url": "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-27.1.11.tar.bz2.asc", - "variants": { - "apache": { - "variant": "apache", - "base": "debian", - "baseVersion": "bookworm", - "phpVersion": "8.2" - }, - "fpm": { - "variant": "fpm", - "base": "debian", - "baseVersion": "bookworm", - "phpVersion": "8.2" - }, - "fpm-alpine": { - "variant": "fpm-alpine", - "base": "alpine", - "baseVersion": "3.20", - "phpVersion": "8.2" - } - } } } From 53653c264827342eb7145115bee5138e2cb84443 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Tue, 3 Sep 2024 19:57:56 +0000 Subject: [PATCH 077/123] Runs update.sh --- 29/apache/Dockerfile | 6 +++--- 29/fpm-alpine/Dockerfile | 6 +++--- 29/fpm/Dockerfile | 6 +++--- latest.txt | 2 +- versions.json | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/29/apache/Dockerfile b/29/apache/Dockerfile index b311cfbe..d594b561 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 29.0.5 +ENV NEXTCLOUD_VERSION 29.0.6 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.5.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.6.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.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/29/fpm-alpine/Dockerfile b/29/fpm-alpine/Dockerfile index ac21a63f..92fc51db 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.5 +ENV NEXTCLOUD_VERSION 29.0.6 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.6.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.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/29/fpm/Dockerfile b/29/fpm/Dockerfile index 6a11f999..8d8b8bb6 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.5 +ENV NEXTCLOUD_VERSION 29.0.6 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.5.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.6.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.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 c67164eb..5608157e 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -29.0.5 +29.0.6 diff --git a/versions.json b/versions.json index e97ea0e6..00ec7c24 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "29": { "branch": "29", - "version": "29.0.5", - "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.5.tar.bz2.asc", + "version": "29.0.6", + "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.6.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.6.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From d78afcbcda693e679754b65be2bbca54b36b5b32 Mon Sep 17 00:00:00 2001 From: J0WI Date: Tue, 3 Sep 2024 20:17:50 +0000 Subject: [PATCH 078/123] Bump stable to 29.0.6 Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index ab043083..8d90d85b 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='29.0.5' +stable_channel='29.0.6' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From f3bd22ca9214f8ef1247fc09ba922f1aa11847a3 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 10 Sep 2024 10:57:46 +0200 Subject: [PATCH 079/123] ci: Update workflows Signed-off-by: Joas Schilling --- .github/workflows/command-rebase.yml | 51 ---------------------------- 1 file changed, 51 deletions(-) delete mode 100644 .github/workflows/command-rebase.yml diff --git a/.github/workflows/command-rebase.yml b/.github/workflows/command-rebase.yml deleted file mode 100644 index ec95ccbb..00000000 --- a/.github/workflows/command-rebase.yml +++ /dev/null @@ -1,51 +0,0 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization - -name: Rebase command - -on: - issue_comment: - types: created - -permissions: - contents: read - -jobs: - rebase: - runs-on: ubuntu-latest - permissions: - contents: none - - # On pull requests and if the comment starts with `/rebase` - if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase') - - steps: - - name: Add reaction on start - uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1 - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - repository: ${{ github.event.repository.full_name }} - comment-id: ${{ github.event.comment.id }} - reaction-type: "+1" - - - name: Checkout the latest code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - with: - fetch-depth: 0 - token: ${{ secrets.COMMAND_BOT_PAT }} - - - name: Automatic Rebase - uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8 - env: - GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} - - - name: Add reaction on failure - uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1 - if: failure() - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - repository: ${{ github.event.repository.full_name }} - comment-id: ${{ github.event.comment.id }} - reaction-type: "-1" From 1c8d764f3c8646abe4206c8215b3198b19c047bc Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Fri, 13 Sep 2024 00:30:28 +0000 Subject: [PATCH 080/123] Runs update.sh --- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/fpm/Dockerfile | 6 +++--- 29/apache/Dockerfile | 6 +++--- 29/fpm-alpine/Dockerfile | 6 +++--- 29/fpm/Dockerfile | 6 +++--- latest.txt | 2 +- versions.json | 12 ++++++------ 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile index a5f90873..9ac2e524 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.9 +ENV NEXTCLOUD_VERSION 28.0.10 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-28.0.9.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index c0f2ad23..02ab2450 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.9 +ENV NEXTCLOUD_VERSION 28.0.10 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index ec28043f..17432c85 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.9 +ENV NEXTCLOUD_VERSION 28.0.10 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-28.0.9.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.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/apache/Dockerfile b/29/apache/Dockerfile index d594b561..371d4cd7 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 29.0.6 +ENV NEXTCLOUD_VERSION 29.0.7 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.6.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.6.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.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 92fc51db..5e8aa0f8 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.6 +ENV NEXTCLOUD_VERSION 29.0.7 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.6.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.6.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.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 8d8b8bb6..a134d720 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.6 +ENV NEXTCLOUD_VERSION 29.0.7 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.6.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.6.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.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 5608157e..94bc752d 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -29.0.6 +29.0.7 diff --git a/versions.json b/versions.json index 00ec7c24..6fc23089 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "29": { "branch": "29", - "version": "29.0.6", - "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.6.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.6.tar.bz2.asc", + "version": "29.0.7", + "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -27,9 +27,9 @@ }, "28": { "branch": "28", - "version": "28.0.9", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.9.tar.bz2.asc", + "version": "28.0.10", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From 0ffd24170f863f302dfb74fe3a63b6c41f82a4fa Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Sun, 15 Sep 2024 00:34:40 +0000 Subject: [PATCH 081/123] Runs update.sh --- 30/apache/Dockerfile | 174 +++++++++++ .../config/apache-pretty-urls.config.php | 4 + 30/apache/config/apcu.config.php | 4 + 30/apache/config/apps.config.php | 15 + 30/apache/config/autoconfig.php | 41 +++ 30/apache/config/redis.config.php | 17 + 30/apache/config/reverse-proxy.config.php | 30 ++ 30/apache/config/s3.config.php | 48 +++ 30/apache/config/smtp.config.php | 22 ++ 30/apache/config/swift.config.php | 31 ++ .../config/upgrade-disable-web.config.php | 4 + 30/apache/cron.sh | 4 + 30/apache/entrypoint.sh | 293 ++++++++++++++++++ 30/apache/upgrade.exclude | 6 + 30/fpm-alpine/Dockerfile | 150 +++++++++ 30/fpm-alpine/config/apcu.config.php | 4 + 30/fpm-alpine/config/apps.config.php | 15 + 30/fpm-alpine/config/autoconfig.php | 41 +++ 30/fpm-alpine/config/redis.config.php | 17 + 30/fpm-alpine/config/reverse-proxy.config.php | 30 ++ 30/fpm-alpine/config/s3.config.php | 48 +++ 30/fpm-alpine/config/smtp.config.php | 22 ++ 30/fpm-alpine/config/swift.config.php | 31 ++ .../config/upgrade-disable-web.config.php | 4 + 30/fpm-alpine/cron.sh | 4 + 30/fpm-alpine/entrypoint.sh | 293 ++++++++++++++++++ 30/fpm-alpine/upgrade.exclude | 6 + 30/fpm/Dockerfile | 159 ++++++++++ 30/fpm/config/apcu.config.php | 4 + 30/fpm/config/apps.config.php | 15 + 30/fpm/config/autoconfig.php | 41 +++ 30/fpm/config/redis.config.php | 17 + 30/fpm/config/reverse-proxy.config.php | 30 ++ 30/fpm/config/s3.config.php | 48 +++ 30/fpm/config/smtp.config.php | 22 ++ 30/fpm/config/swift.config.php | 31 ++ 30/fpm/config/upgrade-disable-web.config.php | 4 + 30/fpm/cron.sh | 4 + 30/fpm/entrypoint.sh | 293 ++++++++++++++++++ 30/fpm/upgrade.exclude | 6 + latest.txt | 2 +- versions.json | 26 ++ 42 files changed, 2059 insertions(+), 1 deletion(-) create mode 100644 30/apache/Dockerfile create mode 100644 30/apache/config/apache-pretty-urls.config.php create mode 100644 30/apache/config/apcu.config.php create mode 100644 30/apache/config/apps.config.php create mode 100644 30/apache/config/autoconfig.php create mode 100644 30/apache/config/redis.config.php create mode 100644 30/apache/config/reverse-proxy.config.php create mode 100644 30/apache/config/s3.config.php create mode 100644 30/apache/config/smtp.config.php create mode 100644 30/apache/config/swift.config.php create mode 100644 30/apache/config/upgrade-disable-web.config.php create mode 100755 30/apache/cron.sh create mode 100755 30/apache/entrypoint.sh create mode 100644 30/apache/upgrade.exclude create mode 100644 30/fpm-alpine/Dockerfile create mode 100644 30/fpm-alpine/config/apcu.config.php create mode 100644 30/fpm-alpine/config/apps.config.php create mode 100644 30/fpm-alpine/config/autoconfig.php create mode 100644 30/fpm-alpine/config/redis.config.php create mode 100644 30/fpm-alpine/config/reverse-proxy.config.php create mode 100644 30/fpm-alpine/config/s3.config.php create mode 100644 30/fpm-alpine/config/smtp.config.php create mode 100644 30/fpm-alpine/config/swift.config.php create mode 100644 30/fpm-alpine/config/upgrade-disable-web.config.php create mode 100755 30/fpm-alpine/cron.sh create mode 100755 30/fpm-alpine/entrypoint.sh create mode 100644 30/fpm-alpine/upgrade.exclude create mode 100644 30/fpm/Dockerfile create mode 100644 30/fpm/config/apcu.config.php create mode 100644 30/fpm/config/apps.config.php create mode 100644 30/fpm/config/autoconfig.php create mode 100644 30/fpm/config/redis.config.php create mode 100644 30/fpm/config/reverse-proxy.config.php create mode 100644 30/fpm/config/s3.config.php create mode 100644 30/fpm/config/smtp.config.php create mode 100644 30/fpm/config/swift.config.php create mode 100644 30/fpm/config/upgrade-disable-web.config.php create mode 100755 30/fpm/cron.sh create mode 100755 30/fpm/entrypoint.sh create mode 100644 30/fpm/upgrade.exclude diff --git a/30/apache/Dockerfile b/30/apache/Dockerfile new file mode 100644 index 00000000..93642f7b --- /dev/null +++ b/30/apache/Dockerfile @@ -0,0 +1,174 @@ +# DO NOT EDIT: created by update.sh from Dockerfile-debian.template +FROM php:8.2-apache-bookworm + +# entrypoint.sh and cron.sh dependencies +RUN set -ex; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + busybox-static \ + bzip2 \ + libldap-common \ + libmagickcore-6.q16-6-extra \ + rsync \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ + mkdir -p /var/spool/cron/crontabs; \ + echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data + +# install the PHP extensions we need +# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html +ENV PHP_MEMORY_LIMIT 512M +ENV PHP_UPLOAD_LIMIT 512M +RUN set -ex; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + libcurl4-openssl-dev \ + libevent-dev \ + libfreetype6-dev \ + libgmp-dev \ + libicu-dev \ + libjpeg-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libpng-dev \ + libpq-dev \ + libwebp-dev \ + libxml2-dev \ + libzip-dev \ + ; \ + \ + debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ + docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ + docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ + docker-php-ext-install -j "$(nproc)" \ + bcmath \ + exif \ + ftp \ + gd \ + gmp \ + intl \ + ldap \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + sysvsem \ + zip \ + ; \ + \ +# pecl will claim success even if one install fails, so we need to perform each install separately + pecl install APCu-5.1.23; \ + pecl install imagick-3.7.0; \ + pecl install memcached-3.2.0; \ + pecl install redis-6.0.2; \ + \ + docker-php-ext-enable \ + apcu \ + imagick \ + memcached \ + redis \ + ; \ + rm -r /tmp/pear; \ + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark; \ + ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -rt apt-mark manual; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/* + +# set recommended PHP.ini settings +# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache +RUN { \ + echo 'opcache.enable=1'; \ + echo 'opcache.interned_strings_buffer=32'; \ + echo 'opcache.max_accelerated_files=10000'; \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.save_comments=1'; \ + echo 'opcache.revalidate_freq=60'; \ + echo 'opcache.jit=1255'; \ + echo 'opcache.jit_buffer_size=128M'; \ + } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ + \ + echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ + \ + { \ + echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ + echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ + echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ + \ + mkdir /var/www/data; \ + mkdir -p /docker-entrypoint-hooks.d/pre-installation \ + /docker-entrypoint-hooks.d/post-installation \ + /docker-entrypoint-hooks.d/pre-upgrade \ + /docker-entrypoint-hooks.d/post-upgrade \ + /docker-entrypoint-hooks.d/before-starting; \ + chown -R www-data:root /var/www; \ + chmod -R g=u /var/www + +VOLUME /var/www/html + +RUN a2enmod headers rewrite remoteip ; \ + { \ + echo 'RemoteIPHeader X-Real-IP'; \ + echo 'RemoteIPInternalProxy 10.0.0.0/8'; \ + echo 'RemoteIPInternalProxy 172.16.0.0/12'; \ + echo 'RemoteIPInternalProxy 192.168.0.0/16'; \ + } > /etc/apache2/conf-available/remoteip.conf; \ + a2enconf remoteip + +# set apache config LimitRequestBody +ENV APACHE_BODY_LIMIT 1073741824 +RUN { \ + echo 'LimitRequestBody ${APACHE_BODY_LIMIT}'; \ + } > /etc/apache2/conf-available/apache-limits.conf; \ + a2enconf apache-limits + +ENV NEXTCLOUD_VERSION 30.0.0 + +RUN set -ex; \ + fetchDeps=" \ + gnupg \ + dirmngr \ + "; \ + 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.0.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.0.tar.bz2.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ +# gpg key from https://nextcloud.com/nextcloud.asc + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ + gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ + gpgconf --kill all; \ + rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ + mkdir -p /usr/src/nextcloud/data; \ + 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; \ + rm -rf /var/lib/apt/lists/* + +COPY *.sh upgrade.exclude / +COPY config/* /usr/src/nextcloud/config/ + +ENTRYPOINT ["/entrypoint.sh"] +CMD ["apache2-foreground"] diff --git a/30/apache/config/apache-pretty-urls.config.php b/30/apache/config/apache-pretty-urls.config.php new file mode 100644 index 00000000..72da1d8c --- /dev/null +++ b/30/apache/config/apache-pretty-urls.config.php @@ -0,0 +1,4 @@ + '/', +); diff --git a/30/apache/config/apcu.config.php b/30/apache/config/apcu.config.php new file mode 100644 index 00000000..69fed876 --- /dev/null +++ b/30/apache/config/apcu.config.php @@ -0,0 +1,4 @@ + '\OC\Memcache\APCu', +); diff --git a/30/apache/config/apps.config.php b/30/apache/config/apps.config.php new file mode 100644 index 00000000..4c37f72a --- /dev/null +++ b/30/apache/config/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + 'path' => OC::$SERVERROOT.'/apps', + 'url' => '/apps', + 'writable' => false, + ), + 1 => array ( + 'path' => OC::$SERVERROOT.'/custom_apps', + 'url' => '/custom_apps', + 'writable' => true, + ), + ), +); diff --git a/30/apache/config/autoconfig.php b/30/apache/config/autoconfig.php new file mode 100644 index 00000000..92ad2a1c --- /dev/null +++ b/30/apache/config/autoconfig.php @@ -0,0 +1,41 @@ + '\OC\Memcache\Redis', + 'memcache.locking' => '\OC\Memcache\Redis', + 'redis' => array( + 'host' => getenv('REDIS_HOST'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), + ), + ); + + if (getenv('REDIS_HOST_PORT') !== false) { + $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); + } elseif (getenv('REDIS_HOST')[0] != '/') { + $CONFIG['redis']['port'] = 6379; + } +} diff --git a/30/apache/config/reverse-proxy.config.php b/30/apache/config/reverse-proxy.config.php new file mode 100644 index 00000000..7df0415e --- /dev/null +++ b/30/apache/config/reverse-proxy.config.php @@ -0,0 +1,30 @@ + array( + 'class' => '\OC\Files\ObjectStore\S3', + 'arguments' => array( + 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), + 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', + 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', + 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', + 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", + 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, + 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + // required for some non Amazon S3 implementations + 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', + // required for older protocol versions + 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' + ) + ) + ); + + if (getenv('OBJECTSTORE_S3_KEY_FILE')) { + $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_KEY')) { + $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); + } else { + $CONFIG['objectstore']['arguments']['key'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { + $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SECRET')) { + $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); + } else { + $CONFIG['objectstore']['arguments']['secret'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } +} diff --git a/30/apache/config/smtp.config.php b/30/apache/config/smtp.config.php new file mode 100644 index 00000000..66a2ef7e --- /dev/null +++ b/30/apache/config/smtp.config.php @@ -0,0 +1,22 @@ + 'smtp', + 'mail_smtphost' => getenv('SMTP_HOST'), + 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), + 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', + 'mail_smtpname' => getenv('SMTP_NAME') ?: '', + 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), + 'mail_domain' => getenv('MAIL_DOMAIN'), + ); + + if (getenv('SMTP_PASSWORD_FILE')) { + $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); + } elseif (getenv('SMTP_PASSWORD')) { + $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); + } else { + $CONFIG['mail_smtppassword'] = ''; + } +} diff --git a/30/apache/config/swift.config.php b/30/apache/config/swift.config.php new file mode 100644 index 00000000..47ada566 --- /dev/null +++ b/30/apache/config/swift.config.php @@ -0,0 +1,31 @@ + [ + 'class' => 'OC\\Files\\ObjectStore\\Swift', + 'arguments' => [ + 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', + 'user' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), + 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', + ], + ], + 'scope' => [ + 'project' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', + ], + ], + ], + 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', + 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), + 'url' => getenv('OBJECTSTORE_SWIFT_URL'), + 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), + ] + ] + ); +} diff --git a/30/apache/config/upgrade-disable-web.config.php b/30/apache/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/30/apache/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/30/apache/cron.sh b/30/apache/cron.sh new file mode 100755 index 00000000..b4cd9af6 --- /dev/null +++ b/30/apache/cron.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -eu + +exec busybox crond -f -L /dev/stdout diff --git a/30/apache/entrypoint.sh b/30/apache/entrypoint.sh new file mode 100755 index 00000000..4e06fcc4 --- /dev/null +++ b/30/apache/entrypoint.sh @@ -0,0 +1,293 @@ +#!/bin/sh +set -eu + +# version_greater A B returns whether A > B +version_greater() { + [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] +} + +# return true if specified directory is empty +directory_empty() { + [ -z "$(ls -A "$1/")" ] +} + +run_as() { + if [ "$(id -u)" = 0 ]; then + su -p "$user" -s /bin/sh -c "$1" + else + sh -c "$1" + fi +} + +# Execute all executable files in a given directory in alphanumeric order +run_path() { + local hook_folder_path="/docker-entrypoint-hooks.d/$1" + local return_code=0 + + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" + return 0 + fi + + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + + ( + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" + continue + fi + + echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" + + run_as "${script_file_path}" || return_code="$?" + + if [ "${return_code}" -ne "0" ]; then + echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" + exit 1 + fi + + echo "==> Finished the script: \"${script_file_path}\"" + done + ) +} + +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' +# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of +# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") + local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") + if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then + echo >&2 "error: both $var and $fileVar are set (but are exclusive)" + exit 1 + fi + if [ -n "${varValue}" ]; then + export "$var"="${varValue}" + elif [ -n "${fileVarValue}" ]; then + export "$var"="$(cat "${fileVarValue}")" + elif [ -n "${def}" ]; then + export "$var"="$def" + fi + unset "$fileVar" +} + +if expr "$1" : "apache" 1>/dev/null; then + if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then + a2disconf remoteip + fi +fi + +if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + uid="$(id -u)" + gid="$(id -g)" + if [ "$uid" = '0' ]; then + case "$1" in + apache2*) + user="${APACHE_RUN_USER:-www-data}" + group="${APACHE_RUN_GROUP:-www-data}" + + # strip off any '#' symbol ('#1000' is valid syntax for Apache) + user="${user#'#'}" + group="${group#'#'}" + ;; + *) # php-fpm + user='www-data' + group='www-data' + ;; + esac + else + user="$uid" + group="$gid" + fi + + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + file_env REDIS_HOST_PASSWORD + echo 'session.save_handler = redis' + # check if redis host is an unix socket path + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then + if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then + echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" + else + echo "session.save_path = \"unix://${REDIS_HOST}\"" + 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}\"" + else + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + 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. + ( + if ! flock -n 9; then + # If we couldn't get it immediately, show a message, then wait for real + echo "Another process is initializing Nextcloud. Waiting..." + flock 9 + fi + + installed_version="0.0.0.0" + if [ -f /var/www/html/version.php ]; then + # shellcheck disable=SC2016 + installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" + fi + # shellcheck disable=SC2016 + image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" + + if version_greater "$installed_version" "$image_version"; then + echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" + exit 1 + fi + + if version_greater "$image_version" "$installed_version"; then + echo "Initializing nextcloud $image_version ..." + if [ "$installed_version" != "0.0.0.0" ]; then + if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then + echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." + echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." + exit 1 + fi + echo "Upgrading nextcloud from $installed_version ..." + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before + fi + if [ "$(id -u)" = 0 ]; then + rsync_options="-rlDog --chown $user:$group" + else + rsync_options="-rlD" + fi + + rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ + for dir in config data custom_apps themes; do + if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then + rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + fi + done + rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + + # Install + if [ "$installed_version" = "0.0.0.0" ]; then + echo "New nextcloud instance" + + file_env NEXTCLOUD_ADMIN_PASSWORD + file_env NEXTCLOUD_ADMIN_USER + + install=false + if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then + # shellcheck disable=SC2016 + install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' + if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then + # shellcheck disable=SC2016 + install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' + fi + + file_env MYSQL_DATABASE + file_env MYSQL_PASSWORD + file_env MYSQL_USER + file_env POSTGRES_DB + file_env POSTGRES_PASSWORD + file_env POSTGRES_USER + + if [ -n "${SQLITE_DATABASE+x}" ]; then + echo "Installing with SQLite database" + # shellcheck disable=SC2016 + install_options=$install_options' --database-name "$SQLITE_DATABASE"' + install=true + elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then + echo "Installing with MySQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' + install=true + elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then + echo "Installing with PostgreSQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' + install=true + fi + + if [ "$install" = true ]; then + run_path pre-installation + + echo "Starting nextcloud installation" + max_retries=10 + try=0 + until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" + do + echo "Retrying install..." + try=$((try+1)) + sleep 10s + done + if [ "$try" -gt "$max_retries" ]; then + echo "Installing of nextcloud failed!" + exit 1 + fi + if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then + echo "Setting trusted domains…" + NC_TRUSTED_DOMAIN_IDX=1 + for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do + DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" + NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) + done + fi + + run_path post-installation + fi + fi + # not enough specified to do a fully automated installation + if [ "$install" = false ]; then + echo "Next step: Access your instance to finish the web-based installation!" + echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." + fi + # Upgrade + else + run_path pre-upgrade + + run_as 'php /var/www/html/occ upgrade' + + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after + echo "The following apps have been disabled:" + diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 + rm -f /tmp/list_before /tmp/list_after + + run_path post-upgrade + fi + + echo "Initializing finished" + fi + + # Update htaccess after init if requested + if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then + run_as 'php /var/www/html/occ maintenance:update:htaccess' + fi + ) 9> /var/www/html/nextcloud-init-sync.lock + + # warn if config files on persistent storage differ from the latest version of this image + for cfgPath in /usr/src/nextcloud/config/*.php; do + cfgFile=$(basename "$cfgPath") + + if [ "$cfgFile" != "config.sample.php" ]; then + if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then + echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" + fi + fi + done + + run_path before-starting +fi + +exec "$@" diff --git a/30/apache/upgrade.exclude b/30/apache/upgrade.exclude new file mode 100644 index 00000000..31ce39a8 --- /dev/null +++ b/30/apache/upgrade.exclude @@ -0,0 +1,6 @@ +/config/ +/data/ +/custom_apps/ +/themes/ +/version.php +/nextcloud-init-sync.lock diff --git a/30/fpm-alpine/Dockerfile b/30/fpm-alpine/Dockerfile new file mode 100644 index 00000000..11c6e1ba --- /dev/null +++ b/30/fpm-alpine/Dockerfile @@ -0,0 +1,150 @@ +# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template +FROM php:8.2-fpm-alpine3.20 + +# entrypoint.sh and cron.sh dependencies +RUN set -ex; \ + \ + apk add --no-cache \ + imagemagick \ + imagemagick-pdf \ + imagemagick-jpeg \ + imagemagick-raw \ + imagemagick-tiff \ + imagemagick-heic \ + imagemagick-webp \ + imagemagick-svg \ + rsync \ + ; \ + \ + rm /var/spool/cron/crontabs/root; \ + echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data + +# install the PHP extensions we need +# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html +RUN set -ex; \ + \ + apk add --no-cache --virtual .build-deps \ + $PHPIZE_DEPS \ + autoconf \ + freetype-dev \ + gmp-dev \ + icu-dev \ + imagemagick-dev \ + libevent-dev \ + libjpeg-turbo-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libpng-dev \ + libwebp-dev \ + libxml2-dev \ + libzip-dev \ + openldap-dev \ + pcre-dev \ + postgresql-dev \ + ; \ + \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ + docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ + docker-php-ext-configure ldap; \ + docker-php-ext-install -j "$(nproc)" \ + bcmath \ + exif \ + ftp \ + gd \ + gmp \ + intl \ + ldap \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + sysvsem \ + zip \ + ; \ + \ +# pecl will claim success even if one install fails, so we need to perform each install separately + pecl install APCu-5.1.23; \ + pecl install imagick-3.7.0; \ + pecl install memcached-3.2.0; \ + pecl install redis-6.0.2; \ + \ + docker-php-ext-enable \ + apcu \ + imagick \ + memcached \ + redis \ + ; \ + rm -r /tmp/pear; \ + \ + runDeps="$( \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ + | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ + )"; \ + apk add --no-network --virtual .nextcloud-phpext-rundeps $runDeps; \ + apk del --no-network .build-deps + +# set recommended PHP.ini settings +# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache +ENV PHP_MEMORY_LIMIT 512M +ENV PHP_UPLOAD_LIMIT 512M +RUN { \ + echo 'opcache.enable=1'; \ + echo 'opcache.interned_strings_buffer=32'; \ + echo 'opcache.max_accelerated_files=10000'; \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.save_comments=1'; \ + echo 'opcache.revalidate_freq=60'; \ + echo 'opcache.jit=1255'; \ + echo 'opcache.jit_buffer_size=128M'; \ + } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ + \ + echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ + \ + { \ + echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ + echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ + echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ + \ + mkdir /var/www/data; \ + mkdir -p /docker-entrypoint-hooks.d/pre-installation \ + /docker-entrypoint-hooks.d/post-installation \ + /docker-entrypoint-hooks.d/pre-upgrade \ + /docker-entrypoint-hooks.d/post-upgrade \ + /docker-entrypoint-hooks.d/before-starting; \ + chown -R www-data:root /var/www; \ + chmod -R g=u /var/www + +VOLUME /var/www/html + + +ENV NEXTCLOUD_VERSION 30.0.0 + +RUN set -ex; \ + apk add --no-cache --virtual .fetch-deps \ + bzip2 \ + gnupg \ + ; \ + \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.0.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.0.tar.bz2.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ +# gpg key from https://nextcloud.com/nextcloud.asc + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ + gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ + gpgconf --kill all; \ + rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ + mkdir -p /usr/src/nextcloud/data; \ + mkdir -p /usr/src/nextcloud/custom_apps; \ + chmod +x /usr/src/nextcloud/occ; \ + apk del --no-network .fetch-deps + +COPY *.sh upgrade.exclude / +COPY config/* /usr/src/nextcloud/config/ + +ENTRYPOINT ["/entrypoint.sh"] +CMD ["php-fpm"] diff --git a/30/fpm-alpine/config/apcu.config.php b/30/fpm-alpine/config/apcu.config.php new file mode 100644 index 00000000..69fed876 --- /dev/null +++ b/30/fpm-alpine/config/apcu.config.php @@ -0,0 +1,4 @@ + '\OC\Memcache\APCu', +); diff --git a/30/fpm-alpine/config/apps.config.php b/30/fpm-alpine/config/apps.config.php new file mode 100644 index 00000000..4c37f72a --- /dev/null +++ b/30/fpm-alpine/config/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + 'path' => OC::$SERVERROOT.'/apps', + 'url' => '/apps', + 'writable' => false, + ), + 1 => array ( + 'path' => OC::$SERVERROOT.'/custom_apps', + 'url' => '/custom_apps', + 'writable' => true, + ), + ), +); diff --git a/30/fpm-alpine/config/autoconfig.php b/30/fpm-alpine/config/autoconfig.php new file mode 100644 index 00000000..92ad2a1c --- /dev/null +++ b/30/fpm-alpine/config/autoconfig.php @@ -0,0 +1,41 @@ + '\OC\Memcache\Redis', + 'memcache.locking' => '\OC\Memcache\Redis', + 'redis' => array( + 'host' => getenv('REDIS_HOST'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), + ), + ); + + if (getenv('REDIS_HOST_PORT') !== false) { + $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); + } elseif (getenv('REDIS_HOST')[0] != '/') { + $CONFIG['redis']['port'] = 6379; + } +} diff --git a/30/fpm-alpine/config/reverse-proxy.config.php b/30/fpm-alpine/config/reverse-proxy.config.php new file mode 100644 index 00000000..7df0415e --- /dev/null +++ b/30/fpm-alpine/config/reverse-proxy.config.php @@ -0,0 +1,30 @@ + array( + 'class' => '\OC\Files\ObjectStore\S3', + 'arguments' => array( + 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), + 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', + 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', + 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', + 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", + 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, + 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + // required for some non Amazon S3 implementations + 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', + // required for older protocol versions + 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' + ) + ) + ); + + if (getenv('OBJECTSTORE_S3_KEY_FILE')) { + $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_KEY')) { + $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); + } else { + $CONFIG['objectstore']['arguments']['key'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { + $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SECRET')) { + $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); + } else { + $CONFIG['objectstore']['arguments']['secret'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } +} diff --git a/30/fpm-alpine/config/smtp.config.php b/30/fpm-alpine/config/smtp.config.php new file mode 100644 index 00000000..66a2ef7e --- /dev/null +++ b/30/fpm-alpine/config/smtp.config.php @@ -0,0 +1,22 @@ + 'smtp', + 'mail_smtphost' => getenv('SMTP_HOST'), + 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), + 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', + 'mail_smtpname' => getenv('SMTP_NAME') ?: '', + 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), + 'mail_domain' => getenv('MAIL_DOMAIN'), + ); + + if (getenv('SMTP_PASSWORD_FILE')) { + $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); + } elseif (getenv('SMTP_PASSWORD')) { + $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); + } else { + $CONFIG['mail_smtppassword'] = ''; + } +} diff --git a/30/fpm-alpine/config/swift.config.php b/30/fpm-alpine/config/swift.config.php new file mode 100644 index 00000000..47ada566 --- /dev/null +++ b/30/fpm-alpine/config/swift.config.php @@ -0,0 +1,31 @@ + [ + 'class' => 'OC\\Files\\ObjectStore\\Swift', + 'arguments' => [ + 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', + 'user' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), + 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', + ], + ], + 'scope' => [ + 'project' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', + ], + ], + ], + 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', + 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), + 'url' => getenv('OBJECTSTORE_SWIFT_URL'), + 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), + ] + ] + ); +} diff --git a/30/fpm-alpine/config/upgrade-disable-web.config.php b/30/fpm-alpine/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/30/fpm-alpine/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/30/fpm-alpine/cron.sh b/30/fpm-alpine/cron.sh new file mode 100755 index 00000000..b4cd9af6 --- /dev/null +++ b/30/fpm-alpine/cron.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -eu + +exec busybox crond -f -L /dev/stdout diff --git a/30/fpm-alpine/entrypoint.sh b/30/fpm-alpine/entrypoint.sh new file mode 100755 index 00000000..4e06fcc4 --- /dev/null +++ b/30/fpm-alpine/entrypoint.sh @@ -0,0 +1,293 @@ +#!/bin/sh +set -eu + +# version_greater A B returns whether A > B +version_greater() { + [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] +} + +# return true if specified directory is empty +directory_empty() { + [ -z "$(ls -A "$1/")" ] +} + +run_as() { + if [ "$(id -u)" = 0 ]; then + su -p "$user" -s /bin/sh -c "$1" + else + sh -c "$1" + fi +} + +# Execute all executable files in a given directory in alphanumeric order +run_path() { + local hook_folder_path="/docker-entrypoint-hooks.d/$1" + local return_code=0 + + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" + return 0 + fi + + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + + ( + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" + continue + fi + + echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" + + run_as "${script_file_path}" || return_code="$?" + + if [ "${return_code}" -ne "0" ]; then + echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" + exit 1 + fi + + echo "==> Finished the script: \"${script_file_path}\"" + done + ) +} + +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' +# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of +# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") + local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") + if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then + echo >&2 "error: both $var and $fileVar are set (but are exclusive)" + exit 1 + fi + if [ -n "${varValue}" ]; then + export "$var"="${varValue}" + elif [ -n "${fileVarValue}" ]; then + export "$var"="$(cat "${fileVarValue}")" + elif [ -n "${def}" ]; then + export "$var"="$def" + fi + unset "$fileVar" +} + +if expr "$1" : "apache" 1>/dev/null; then + if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then + a2disconf remoteip + fi +fi + +if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + uid="$(id -u)" + gid="$(id -g)" + if [ "$uid" = '0' ]; then + case "$1" in + apache2*) + user="${APACHE_RUN_USER:-www-data}" + group="${APACHE_RUN_GROUP:-www-data}" + + # strip off any '#' symbol ('#1000' is valid syntax for Apache) + user="${user#'#'}" + group="${group#'#'}" + ;; + *) # php-fpm + user='www-data' + group='www-data' + ;; + esac + else + user="$uid" + group="$gid" + fi + + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + file_env REDIS_HOST_PASSWORD + echo 'session.save_handler = redis' + # check if redis host is an unix socket path + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then + if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then + echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" + else + echo "session.save_path = \"unix://${REDIS_HOST}\"" + 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}\"" + else + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + 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. + ( + if ! flock -n 9; then + # If we couldn't get it immediately, show a message, then wait for real + echo "Another process is initializing Nextcloud. Waiting..." + flock 9 + fi + + installed_version="0.0.0.0" + if [ -f /var/www/html/version.php ]; then + # shellcheck disable=SC2016 + installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" + fi + # shellcheck disable=SC2016 + image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" + + if version_greater "$installed_version" "$image_version"; then + echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" + exit 1 + fi + + if version_greater "$image_version" "$installed_version"; then + echo "Initializing nextcloud $image_version ..." + if [ "$installed_version" != "0.0.0.0" ]; then + if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then + echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." + echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." + exit 1 + fi + echo "Upgrading nextcloud from $installed_version ..." + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before + fi + if [ "$(id -u)" = 0 ]; then + rsync_options="-rlDog --chown $user:$group" + else + rsync_options="-rlD" + fi + + rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ + for dir in config data custom_apps themes; do + if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then + rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + fi + done + rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + + # Install + if [ "$installed_version" = "0.0.0.0" ]; then + echo "New nextcloud instance" + + file_env NEXTCLOUD_ADMIN_PASSWORD + file_env NEXTCLOUD_ADMIN_USER + + install=false + if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then + # shellcheck disable=SC2016 + install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' + if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then + # shellcheck disable=SC2016 + install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' + fi + + file_env MYSQL_DATABASE + file_env MYSQL_PASSWORD + file_env MYSQL_USER + file_env POSTGRES_DB + file_env POSTGRES_PASSWORD + file_env POSTGRES_USER + + if [ -n "${SQLITE_DATABASE+x}" ]; then + echo "Installing with SQLite database" + # shellcheck disable=SC2016 + install_options=$install_options' --database-name "$SQLITE_DATABASE"' + install=true + elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then + echo "Installing with MySQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' + install=true + elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then + echo "Installing with PostgreSQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' + install=true + fi + + if [ "$install" = true ]; then + run_path pre-installation + + echo "Starting nextcloud installation" + max_retries=10 + try=0 + until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" + do + echo "Retrying install..." + try=$((try+1)) + sleep 10s + done + if [ "$try" -gt "$max_retries" ]; then + echo "Installing of nextcloud failed!" + exit 1 + fi + if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then + echo "Setting trusted domains…" + NC_TRUSTED_DOMAIN_IDX=1 + for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do + DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" + NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) + done + fi + + run_path post-installation + fi + fi + # not enough specified to do a fully automated installation + if [ "$install" = false ]; then + echo "Next step: Access your instance to finish the web-based installation!" + echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." + fi + # Upgrade + else + run_path pre-upgrade + + run_as 'php /var/www/html/occ upgrade' + + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after + echo "The following apps have been disabled:" + diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 + rm -f /tmp/list_before /tmp/list_after + + run_path post-upgrade + fi + + echo "Initializing finished" + fi + + # Update htaccess after init if requested + if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then + run_as 'php /var/www/html/occ maintenance:update:htaccess' + fi + ) 9> /var/www/html/nextcloud-init-sync.lock + + # warn if config files on persistent storage differ from the latest version of this image + for cfgPath in /usr/src/nextcloud/config/*.php; do + cfgFile=$(basename "$cfgPath") + + if [ "$cfgFile" != "config.sample.php" ]; then + if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then + echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" + fi + fi + done + + run_path before-starting +fi + +exec "$@" diff --git a/30/fpm-alpine/upgrade.exclude b/30/fpm-alpine/upgrade.exclude new file mode 100644 index 00000000..31ce39a8 --- /dev/null +++ b/30/fpm-alpine/upgrade.exclude @@ -0,0 +1,6 @@ +/config/ +/data/ +/custom_apps/ +/themes/ +/version.php +/nextcloud-init-sync.lock diff --git a/30/fpm/Dockerfile b/30/fpm/Dockerfile new file mode 100644 index 00000000..e9a09f6a --- /dev/null +++ b/30/fpm/Dockerfile @@ -0,0 +1,159 @@ +# DO NOT EDIT: created by update.sh from Dockerfile-debian.template +FROM php:8.2-fpm-bookworm + +# entrypoint.sh and cron.sh dependencies +RUN set -ex; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + busybox-static \ + bzip2 \ + libldap-common \ + libmagickcore-6.q16-6-extra \ + rsync \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ + mkdir -p /var/spool/cron/crontabs; \ + echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data + +# install the PHP extensions we need +# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html +ENV PHP_MEMORY_LIMIT 512M +ENV PHP_UPLOAD_LIMIT 512M +RUN set -ex; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + libcurl4-openssl-dev \ + libevent-dev \ + libfreetype6-dev \ + libgmp-dev \ + libicu-dev \ + libjpeg-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libpng-dev \ + libpq-dev \ + libwebp-dev \ + libxml2-dev \ + libzip-dev \ + ; \ + \ + debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure ftp --with-openssl-dir=/usr; \ + docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ + docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ + docker-php-ext-install -j "$(nproc)" \ + bcmath \ + exif \ + ftp \ + gd \ + gmp \ + intl \ + ldap \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + sysvsem \ + zip \ + ; \ + \ +# pecl will claim success even if one install fails, so we need to perform each install separately + pecl install APCu-5.1.23; \ + pecl install imagick-3.7.0; \ + pecl install memcached-3.2.0; \ + pecl install redis-6.0.2; \ + \ + docker-php-ext-enable \ + apcu \ + imagick \ + memcached \ + redis \ + ; \ + rm -r /tmp/pear; \ + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark; \ + ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ + | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -rt apt-mark manual; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/* + +# set recommended PHP.ini settings +# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache +RUN { \ + echo 'opcache.enable=1'; \ + echo 'opcache.interned_strings_buffer=32'; \ + echo 'opcache.max_accelerated_files=10000'; \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.save_comments=1'; \ + echo 'opcache.revalidate_freq=60'; \ + echo 'opcache.jit=1255'; \ + echo 'opcache.jit_buffer_size=128M'; \ + } > "${PHP_INI_DIR}/conf.d/opcache-recommended.ini"; \ + \ + echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \ + \ + { \ + echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \ + echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \ + echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \ + } > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \ + \ + mkdir /var/www/data; \ + mkdir -p /docker-entrypoint-hooks.d/pre-installation \ + /docker-entrypoint-hooks.d/post-installation \ + /docker-entrypoint-hooks.d/pre-upgrade \ + /docker-entrypoint-hooks.d/post-upgrade \ + /docker-entrypoint-hooks.d/before-starting; \ + chown -R www-data:root /var/www; \ + chmod -R g=u /var/www + +VOLUME /var/www/html + + +ENV NEXTCLOUD_VERSION 30.0.0 + +RUN set -ex; \ + fetchDeps=" \ + gnupg \ + dirmngr \ + "; \ + 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.0.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.0.tar.bz2.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ +# gpg key from https://nextcloud.com/nextcloud.asc + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ + gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + tar -xjf nextcloud.tar.bz2 -C /usr/src/; \ + gpgconf --kill all; \ + rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \ + rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \ + mkdir -p /usr/src/nextcloud/data; \ + 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; \ + rm -rf /var/lib/apt/lists/* + +COPY *.sh upgrade.exclude / +COPY config/* /usr/src/nextcloud/config/ + +ENTRYPOINT ["/entrypoint.sh"] +CMD ["php-fpm"] diff --git a/30/fpm/config/apcu.config.php b/30/fpm/config/apcu.config.php new file mode 100644 index 00000000..69fed876 --- /dev/null +++ b/30/fpm/config/apcu.config.php @@ -0,0 +1,4 @@ + '\OC\Memcache\APCu', +); diff --git a/30/fpm/config/apps.config.php b/30/fpm/config/apps.config.php new file mode 100644 index 00000000..4c37f72a --- /dev/null +++ b/30/fpm/config/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + 'path' => OC::$SERVERROOT.'/apps', + 'url' => '/apps', + 'writable' => false, + ), + 1 => array ( + 'path' => OC::$SERVERROOT.'/custom_apps', + 'url' => '/custom_apps', + 'writable' => true, + ), + ), +); diff --git a/30/fpm/config/autoconfig.php b/30/fpm/config/autoconfig.php new file mode 100644 index 00000000..92ad2a1c --- /dev/null +++ b/30/fpm/config/autoconfig.php @@ -0,0 +1,41 @@ + '\OC\Memcache\Redis', + 'memcache.locking' => '\OC\Memcache\Redis', + 'redis' => array( + 'host' => getenv('REDIS_HOST'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), + ), + ); + + if (getenv('REDIS_HOST_PORT') !== false) { + $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT'); + } elseif (getenv('REDIS_HOST')[0] != '/') { + $CONFIG['redis']['port'] = 6379; + } +} diff --git a/30/fpm/config/reverse-proxy.config.php b/30/fpm/config/reverse-proxy.config.php new file mode 100644 index 00000000..7df0415e --- /dev/null +++ b/30/fpm/config/reverse-proxy.config.php @@ -0,0 +1,30 @@ + array( + 'class' => '\OC\Files\ObjectStore\S3', + 'arguments' => array( + 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), + 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', + 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', + 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', + 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", + 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, + 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + // required for some non Amazon S3 implementations + 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', + // required for older protocol versions + 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false' + ) + ) + ); + + if (getenv('OBJECTSTORE_S3_KEY_FILE')) { + $CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_KEY')) { + $CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY'); + } else { + $CONFIG['objectstore']['arguments']['key'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SECRET_FILE')) { + $CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SECRET')) { + $CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET'); + } else { + $CONFIG['objectstore']['arguments']['secret'] = ''; + } + + if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))); + } elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + } +} diff --git a/30/fpm/config/smtp.config.php b/30/fpm/config/smtp.config.php new file mode 100644 index 00000000..66a2ef7e --- /dev/null +++ b/30/fpm/config/smtp.config.php @@ -0,0 +1,22 @@ + 'smtp', + 'mail_smtphost' => getenv('SMTP_HOST'), + 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', + 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), + 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', + 'mail_smtpname' => getenv('SMTP_NAME') ?: '', + 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), + 'mail_domain' => getenv('MAIL_DOMAIN'), + ); + + if (getenv('SMTP_PASSWORD_FILE')) { + $CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE'))); + } elseif (getenv('SMTP_PASSWORD')) { + $CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD'); + } else { + $CONFIG['mail_smtppassword'] = ''; + } +} diff --git a/30/fpm/config/swift.config.php b/30/fpm/config/swift.config.php new file mode 100644 index 00000000..47ada566 --- /dev/null +++ b/30/fpm/config/swift.config.php @@ -0,0 +1,31 @@ + [ + 'class' => 'OC\\Files\\ObjectStore\\Swift', + 'arguments' => [ + 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', + 'user' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), + 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', + ], + ], + 'scope' => [ + 'project' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', + ], + ], + ], + 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', + 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), + 'url' => getenv('OBJECTSTORE_SWIFT_URL'), + 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), + ] + ] + ); +} diff --git a/30/fpm/config/upgrade-disable-web.config.php b/30/fpm/config/upgrade-disable-web.config.php new file mode 100644 index 00000000..cb00b436 --- /dev/null +++ b/30/fpm/config/upgrade-disable-web.config.php @@ -0,0 +1,4 @@ + true, +); diff --git a/30/fpm/cron.sh b/30/fpm/cron.sh new file mode 100755 index 00000000..b4cd9af6 --- /dev/null +++ b/30/fpm/cron.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -eu + +exec busybox crond -f -L /dev/stdout diff --git a/30/fpm/entrypoint.sh b/30/fpm/entrypoint.sh new file mode 100755 index 00000000..4e06fcc4 --- /dev/null +++ b/30/fpm/entrypoint.sh @@ -0,0 +1,293 @@ +#!/bin/sh +set -eu + +# version_greater A B returns whether A > B +version_greater() { + [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] +} + +# return true if specified directory is empty +directory_empty() { + [ -z "$(ls -A "$1/")" ] +} + +run_as() { + if [ "$(id -u)" = 0 ]; then + su -p "$user" -s /bin/sh -c "$1" + else + sh -c "$1" + fi +} + +# Execute all executable files in a given directory in alphanumeric order +run_path() { + local hook_folder_path="/docker-entrypoint-hooks.d/$1" + local return_code=0 + + if ! [ -d "${hook_folder_path}" ]; then + echo "=> Skipping the folder \"${hook_folder_path}\", because it doesn't exist" + return 0 + fi + + echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}" + + ( + find "${hook_folder_path}" -maxdepth 1 -iname '*.sh' '(' -type f -o -type l ')' -print | sort | while read -r script_file_path; do + if ! [ -x "${script_file_path}" ]; then + echo "==> The script \"${script_file_path}\" was skipped, because it didn't have the executable flag" + continue + fi + + echo "==> Running the script (cwd: $(pwd)): \"${script_file_path}\"" + + run_as "${script_file_path}" || return_code="$?" + + if [ "${return_code}" -ne "0" ]; then + echo "==> Failed at executing \"${script_file_path}\". Exit code: ${return_code}" + exit 1 + fi + + echo "==> Finished the script: \"${script_file_path}\"" + done + ) +} + +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' +# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of +# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//") + local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//") + if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then + echo >&2 "error: both $var and $fileVar are set (but are exclusive)" + exit 1 + fi + if [ -n "${varValue}" ]; then + export "$var"="${varValue}" + elif [ -n "${fileVarValue}" ]; then + export "$var"="$(cat "${fileVarValue}")" + elif [ -n "${def}" ]; then + export "$var"="$def" + fi + unset "$fileVar" +} + +if expr "$1" : "apache" 1>/dev/null; then + if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then + a2disconf remoteip + fi +fi + +if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then + uid="$(id -u)" + gid="$(id -g)" + if [ "$uid" = '0' ]; then + case "$1" in + apache2*) + user="${APACHE_RUN_USER:-www-data}" + group="${APACHE_RUN_GROUP:-www-data}" + + # strip off any '#' symbol ('#1000' is valid syntax for Apache) + user="${user#'#'}" + group="${group#'#'}" + ;; + *) # php-fpm + user='www-data' + group='www-data' + ;; + esac + else + user="$uid" + group="$gid" + fi + + if [ -n "${REDIS_HOST+x}" ]; then + + echo "Configuring Redis as session handler" + { + file_env REDIS_HOST_PASSWORD + echo 'session.save_handler = redis' + # check if redis host is an unix socket path + if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then + if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then + echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\"" + else + echo "session.save_path = \"unix://${REDIS_HOST}\"" + 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}\"" + else + echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\"" + 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. + ( + if ! flock -n 9; then + # If we couldn't get it immediately, show a message, then wait for real + echo "Another process is initializing Nextcloud. Waiting..." + flock 9 + fi + + installed_version="0.0.0.0" + if [ -f /var/www/html/version.php ]; then + # shellcheck disable=SC2016 + installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" + fi + # shellcheck disable=SC2016 + image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" + + if version_greater "$installed_version" "$image_version"; then + echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?" + exit 1 + fi + + if version_greater "$image_version" "$installed_version"; then + echo "Initializing nextcloud $image_version ..." + if [ "$installed_version" != "0.0.0.0" ]; then + if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then + echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported." + echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16." + exit 1 + fi + echo "Upgrading nextcloud from $installed_version ..." + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before + fi + if [ "$(id -u)" = 0 ]; then + rsync_options="-rlDog --chown $user:$group" + else + rsync_options="-rlD" + fi + + rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/ + for dir in config data custom_apps themes; do + if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then + rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + fi + done + rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/ + + # Install + if [ "$installed_version" = "0.0.0.0" ]; then + echo "New nextcloud instance" + + file_env NEXTCLOUD_ADMIN_PASSWORD + file_env NEXTCLOUD_ADMIN_USER + + install=false + if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then + # shellcheck disable=SC2016 + install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"' + if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then + # shellcheck disable=SC2016 + install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"' + fi + + file_env MYSQL_DATABASE + file_env MYSQL_PASSWORD + file_env MYSQL_USER + file_env POSTGRES_DB + file_env POSTGRES_PASSWORD + file_env POSTGRES_USER + + if [ -n "${SQLITE_DATABASE+x}" ]; then + echo "Installing with SQLite database" + # shellcheck disable=SC2016 + install_options=$install_options' --database-name "$SQLITE_DATABASE"' + install=true + elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then + echo "Installing with MySQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"' + install=true + elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then + echo "Installing with PostgreSQL database" + # shellcheck disable=SC2016 + install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"' + install=true + fi + + if [ "$install" = true ]; then + run_path pre-installation + + echo "Starting nextcloud installation" + max_retries=10 + try=0 + until [ "$try" -gt "$max_retries" ] || run_as "php /var/www/html/occ maintenance:install $install_options" + do + echo "Retrying install..." + try=$((try+1)) + sleep 10s + done + if [ "$try" -gt "$max_retries" ]; then + echo "Installing of nextcloud failed!" + exit 1 + fi + if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then + echo "Setting trusted domains…" + NC_TRUSTED_DOMAIN_IDX=1 + for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do + DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN" + NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1)) + done + fi + + run_path post-installation + fi + fi + # not enough specified to do a fully automated installation + if [ "$install" = false ]; then + echo "Next step: Access your instance to finish the web-based installation!" + echo "Hint: You can specify NEXTCLOUD_ADMIN_USER and NEXTCLOUD_ADMIN_PASSWORD and the database variables _prior to first launch_ to fully automate initial installation." + fi + # Upgrade + else + run_path pre-upgrade + + run_as 'php /var/www/html/occ upgrade' + + run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after + echo "The following apps have been disabled:" + diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1 + rm -f /tmp/list_before /tmp/list_after + + run_path post-upgrade + fi + + echo "Initializing finished" + fi + + # Update htaccess after init if requested + if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ] && [ "$installed_version" != "0.0.0.0" ]; then + run_as 'php /var/www/html/occ maintenance:update:htaccess' + fi + ) 9> /var/www/html/nextcloud-init-sync.lock + + # warn if config files on persistent storage differ from the latest version of this image + for cfgPath in /usr/src/nextcloud/config/*.php; do + cfgFile=$(basename "$cfgPath") + + if [ "$cfgFile" != "config.sample.php" ]; then + if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then + echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" + fi + fi + done + + run_path before-starting +fi + +exec "$@" diff --git a/30/fpm/upgrade.exclude b/30/fpm/upgrade.exclude new file mode 100644 index 00000000..31ce39a8 --- /dev/null +++ b/30/fpm/upgrade.exclude @@ -0,0 +1,6 @@ +/config/ +/data/ +/custom_apps/ +/themes/ +/version.php +/nextcloud-init-sync.lock diff --git a/latest.txt b/latest.txt index 94bc752d..8dd5c17a 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -29.0.7 +30.0.0 diff --git a/versions.json b/versions.json index 6fc23089..5e2fbdcb 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,30 @@ { + "30": { + "branch": "30", + "version": "30.0.0", + "url": "https://download.nextcloud.com/server/releases/nextcloud-30.0.0.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-30.0.0.tar.bz2.asc", + "variants": { + "apache": { + "variant": "apache", + "base": "debian", + "baseVersion": "bookworm", + "phpVersion": "8.2" + }, + "fpm": { + "variant": "fpm", + "base": "debian", + "baseVersion": "bookworm", + "phpVersion": "8.2" + }, + "fpm-alpine": { + "variant": "fpm-alpine", + "base": "alpine", + "baseVersion": "3.20", + "phpVersion": "8.2" + } + } + }, "29": { "branch": "29", "version": "29.0.7", From a1e93f429cb2fbdd66c284aa4ea41ae217b4e482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Wed, 18 Sep 2024 21:43:16 +0200 Subject: [PATCH 082/123] Bump stable to 29.0.7 (#2297) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #2294 Signed-off-by: John Molakvoæ --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 8d90d85b..a7718bc0 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='29.0.6' +stable_channel='29.0.7' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From 2bc1036e611992c56a2cb5e9808698990256574c Mon Sep 17 00:00:00 2001 From: Florian Latifi Date: Wed, 18 Sep 2024 22:45:15 +0200 Subject: [PATCH 083/123] Exclude autoconfig.php from user config check (#2290) Signed-off-by: Florian Latifi --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 4e06fcc4..8e178f2e 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -280,7 +280,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP for cfgPath in /usr/src/nextcloud/config/*.php; do cfgFile=$(basename "$cfgPath") - if [ "$cfgFile" != "config.sample.php" ]; then + if [ "$cfgFile" != "config.sample.php" ] && [ "$cfgFile" != "autoconfig.php" ]; then if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" fi From 30b570f0b553736d63dc63cf487ff1e5e5331474 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Wed, 18 Sep 2024 20:45:28 +0000 Subject: [PATCH 084/123] Runs update.sh --- 28/apache/entrypoint.sh | 2 +- 28/fpm-alpine/entrypoint.sh | 2 +- 28/fpm/entrypoint.sh | 2 +- 29/apache/entrypoint.sh | 2 +- 29/fpm-alpine/entrypoint.sh | 2 +- 29/fpm/entrypoint.sh | 2 +- 30/apache/entrypoint.sh | 2 +- 30/fpm-alpine/entrypoint.sh | 2 +- 30/fpm/entrypoint.sh | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/28/apache/entrypoint.sh b/28/apache/entrypoint.sh index 4e06fcc4..8e178f2e 100755 --- a/28/apache/entrypoint.sh +++ b/28/apache/entrypoint.sh @@ -280,7 +280,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP for cfgPath in /usr/src/nextcloud/config/*.php; do cfgFile=$(basename "$cfgPath") - if [ "$cfgFile" != "config.sample.php" ]; then + if [ "$cfgFile" != "config.sample.php" ] && [ "$cfgFile" != "autoconfig.php" ]; then if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" fi diff --git a/28/fpm-alpine/entrypoint.sh b/28/fpm-alpine/entrypoint.sh index 4e06fcc4..8e178f2e 100755 --- a/28/fpm-alpine/entrypoint.sh +++ b/28/fpm-alpine/entrypoint.sh @@ -280,7 +280,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP for cfgPath in /usr/src/nextcloud/config/*.php; do cfgFile=$(basename "$cfgPath") - if [ "$cfgFile" != "config.sample.php" ]; then + if [ "$cfgFile" != "config.sample.php" ] && [ "$cfgFile" != "autoconfig.php" ]; then if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" fi diff --git a/28/fpm/entrypoint.sh b/28/fpm/entrypoint.sh index 4e06fcc4..8e178f2e 100755 --- a/28/fpm/entrypoint.sh +++ b/28/fpm/entrypoint.sh @@ -280,7 +280,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP for cfgPath in /usr/src/nextcloud/config/*.php; do cfgFile=$(basename "$cfgPath") - if [ "$cfgFile" != "config.sample.php" ]; then + if [ "$cfgFile" != "config.sample.php" ] && [ "$cfgFile" != "autoconfig.php" ]; then if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" fi diff --git a/29/apache/entrypoint.sh b/29/apache/entrypoint.sh index 4e06fcc4..8e178f2e 100755 --- a/29/apache/entrypoint.sh +++ b/29/apache/entrypoint.sh @@ -280,7 +280,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP for cfgPath in /usr/src/nextcloud/config/*.php; do cfgFile=$(basename "$cfgPath") - if [ "$cfgFile" != "config.sample.php" ]; then + if [ "$cfgFile" != "config.sample.php" ] && [ "$cfgFile" != "autoconfig.php" ]; then if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" fi diff --git a/29/fpm-alpine/entrypoint.sh b/29/fpm-alpine/entrypoint.sh index 4e06fcc4..8e178f2e 100755 --- a/29/fpm-alpine/entrypoint.sh +++ b/29/fpm-alpine/entrypoint.sh @@ -280,7 +280,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP for cfgPath in /usr/src/nextcloud/config/*.php; do cfgFile=$(basename "$cfgPath") - if [ "$cfgFile" != "config.sample.php" ]; then + if [ "$cfgFile" != "config.sample.php" ] && [ "$cfgFile" != "autoconfig.php" ]; then if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" fi diff --git a/29/fpm/entrypoint.sh b/29/fpm/entrypoint.sh index 4e06fcc4..8e178f2e 100755 --- a/29/fpm/entrypoint.sh +++ b/29/fpm/entrypoint.sh @@ -280,7 +280,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP for cfgPath in /usr/src/nextcloud/config/*.php; do cfgFile=$(basename "$cfgPath") - if [ "$cfgFile" != "config.sample.php" ]; then + if [ "$cfgFile" != "config.sample.php" ] && [ "$cfgFile" != "autoconfig.php" ]; then if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" fi diff --git a/30/apache/entrypoint.sh b/30/apache/entrypoint.sh index 4e06fcc4..8e178f2e 100755 --- a/30/apache/entrypoint.sh +++ b/30/apache/entrypoint.sh @@ -280,7 +280,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP for cfgPath in /usr/src/nextcloud/config/*.php; do cfgFile=$(basename "$cfgPath") - if [ "$cfgFile" != "config.sample.php" ]; then + if [ "$cfgFile" != "config.sample.php" ] && [ "$cfgFile" != "autoconfig.php" ]; then if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" fi diff --git a/30/fpm-alpine/entrypoint.sh b/30/fpm-alpine/entrypoint.sh index 4e06fcc4..8e178f2e 100755 --- a/30/fpm-alpine/entrypoint.sh +++ b/30/fpm-alpine/entrypoint.sh @@ -280,7 +280,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP for cfgPath in /usr/src/nextcloud/config/*.php; do cfgFile=$(basename "$cfgPath") - if [ "$cfgFile" != "config.sample.php" ]; then + if [ "$cfgFile" != "config.sample.php" ] && [ "$cfgFile" != "autoconfig.php" ]; then if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" fi diff --git a/30/fpm/entrypoint.sh b/30/fpm/entrypoint.sh index 4e06fcc4..8e178f2e 100755 --- a/30/fpm/entrypoint.sh +++ b/30/fpm/entrypoint.sh @@ -280,7 +280,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP for cfgPath in /usr/src/nextcloud/config/*.php; do cfgFile=$(basename "$cfgPath") - if [ "$cfgFile" != "config.sample.php" ]; then + if [ "$cfgFile" != "config.sample.php" ] && [ "$cfgFile" != "autoconfig.php" ]; then if ! cmp -s "/usr/src/nextcloud/config/$cfgFile" "/var/www/html/config/$cfgFile"; then echo "Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile" fi From f6d767efb1c8853952c138f4b6429a2441fbe6e6 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Sun, 22 Sep 2024 00:34:53 +0000 Subject: [PATCH 085/123] Runs update.sh --- 28/apache/Dockerfile | 2 +- 28/fpm-alpine/Dockerfile | 2 +- 28/fpm/Dockerfile | 2 +- 29/apache/Dockerfile | 2 +- 29/fpm-alpine/Dockerfile | 2 +- 29/fpm/Dockerfile | 2 +- 30/apache/Dockerfile | 2 +- 30/fpm-alpine/Dockerfile | 2 +- 30/fpm/Dockerfile | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile index 9ac2e524..f9637bd7 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -65,7 +65,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ + pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 02ab2450..24f4d938 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -63,7 +63,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ + pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/28/fpm/Dockerfile b/28/fpm/Dockerfile index 17432c85..4a8da235 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -65,7 +65,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ + pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/29/apache/Dockerfile b/29/apache/Dockerfile index 371d4cd7..a81658c2 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -65,7 +65,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ + pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/29/fpm-alpine/Dockerfile b/29/fpm-alpine/Dockerfile index 5e8aa0f8..017de203 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -63,7 +63,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ + pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/29/fpm/Dockerfile b/29/fpm/Dockerfile index a134d720..00776307 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -65,7 +65,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ + pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/30/apache/Dockerfile b/30/apache/Dockerfile index 93642f7b..907fc57e 100644 --- a/30/apache/Dockerfile +++ b/30/apache/Dockerfile @@ -65,7 +65,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ + pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/30/fpm-alpine/Dockerfile b/30/fpm-alpine/Dockerfile index 11c6e1ba..a8b5faa6 100644 --- a/30/fpm-alpine/Dockerfile +++ b/30/fpm-alpine/Dockerfile @@ -63,7 +63,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ + pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ diff --git a/30/fpm/Dockerfile b/30/fpm/Dockerfile index e9a09f6a..e2a52ed2 100644 --- a/30/fpm/Dockerfile +++ b/30/fpm/Dockerfile @@ -65,7 +65,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.23; \ + pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ pecl install redis-6.0.2; \ From 9ff7b6a5297714f142df419352511183302c783a Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Sat, 5 Oct 2024 00:31:43 +0000 Subject: [PATCH 086/123] Runs update.sh --- 28/apache/Dockerfile | 2 +- 28/fpm-alpine/Dockerfile | 2 +- 28/fpm/Dockerfile | 2 +- 29/apache/Dockerfile | 2 +- 29/fpm-alpine/Dockerfile | 2 +- 29/fpm/Dockerfile | 2 +- 30/apache/Dockerfile | 2 +- 30/fpm-alpine/Dockerfile | 2 +- 30/fpm/Dockerfile | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile index f9637bd7..5834feec 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -68,7 +68,7 @@ RUN set -ex; \ pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ + pecl install redis-6.1.0; \ \ docker-php-ext-enable \ apcu \ diff --git a/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 24f4d938..a03b7cbb 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -66,7 +66,7 @@ RUN set -ex; \ pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ + pecl install redis-6.1.0; \ \ docker-php-ext-enable \ apcu \ diff --git a/28/fpm/Dockerfile b/28/fpm/Dockerfile index 4a8da235..00980561 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -68,7 +68,7 @@ RUN set -ex; \ pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ + pecl install redis-6.1.0; \ \ docker-php-ext-enable \ apcu \ diff --git a/29/apache/Dockerfile b/29/apache/Dockerfile index a81658c2..9cec1c9d 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -68,7 +68,7 @@ RUN set -ex; \ pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ + pecl install redis-6.1.0; \ \ docker-php-ext-enable \ apcu \ diff --git a/29/fpm-alpine/Dockerfile b/29/fpm-alpine/Dockerfile index 017de203..2469a6bb 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -66,7 +66,7 @@ RUN set -ex; \ pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ + pecl install redis-6.1.0; \ \ docker-php-ext-enable \ apcu \ diff --git a/29/fpm/Dockerfile b/29/fpm/Dockerfile index 00776307..b5836693 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -68,7 +68,7 @@ RUN set -ex; \ pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ + pecl install redis-6.1.0; \ \ docker-php-ext-enable \ apcu \ diff --git a/30/apache/Dockerfile b/30/apache/Dockerfile index 907fc57e..abcd9e7c 100644 --- a/30/apache/Dockerfile +++ b/30/apache/Dockerfile @@ -68,7 +68,7 @@ RUN set -ex; \ pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ + pecl install redis-6.1.0; \ \ docker-php-ext-enable \ apcu \ diff --git a/30/fpm-alpine/Dockerfile b/30/fpm-alpine/Dockerfile index a8b5faa6..9a553d78 100644 --- a/30/fpm-alpine/Dockerfile +++ b/30/fpm-alpine/Dockerfile @@ -66,7 +66,7 @@ RUN set -ex; \ pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ + pecl install redis-6.1.0; \ \ docker-php-ext-enable \ apcu \ diff --git a/30/fpm/Dockerfile b/30/fpm/Dockerfile index e2a52ed2..2877c10e 100644 --- a/30/fpm/Dockerfile +++ b/30/fpm/Dockerfile @@ -68,7 +68,7 @@ RUN set -ex; \ pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ pecl install memcached-3.2.0; \ - pecl install redis-6.0.2; \ + pecl install redis-6.1.0; \ \ docker-php-ext-enable \ apcu \ From 38994cbb87355f49295aff18c3578222d29a4bf5 Mon Sep 17 00:00:00 2001 From: Kaloyan Nikolov Date: Mon, 7 Oct 2024 20:27:05 +0300 Subject: [PATCH 087/123] Documentation and examples update for use with docker compose v2 (#2201) * Update examples section according to the latest docker compose requirements. Signed-off-by: Kaloyan Nikolov * Minor readme updates to match the changes for the compose v2 syntax. Signed-off-by: Kaloyan Nikolov * Fix wrong environment variable Signed-off-by: Kaloyan Nikolov * Add missing headers to fpm config Signed-off-by: Kaloyan Nikolov * Fix cache control Signed-off-by: Kaloyan Nikolov * Add mjs file extension in a proper way. Signed-off-by: Kaloyan Nikolov * Typos fixed, minor clarification changes Signed-off-by: Kaloyan Nikolov * Removed logging from compose files. Signed-off-by: Kaloyan Nikolov * Restored MariaDB to 10.6 as per docs suggestions Signed-off-by: Kaloyan Nikolov * Remove extra nginx volume Signed-off-by: Kaloyan Nikolov * Removed GH specific markdown from Readme, change mariadb to recommended version Signed-off-by: Kaloyan Nikolov * typo Signed-off-by: Kaloyan Nikolov * Update .examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml Signed-off-by: J0WI * Update to correct MariaDB command Signed-off-by: Kaloyan Nikolov * Updated compose files for mariadb to match current docs Signed-off-by: Kaloyan Nikolov * Update outdated docker-compose command in Readme Signed-off-by: Kaloyan Nikolov * Added back --log-bin to MariaDB command. See PR 1881 Signed-off-by: Kaloyan Nikolov * Remove wrongly added logging to Readme.MD Signed-off-by: Kaloyan Nikolov * Use proper name for --log-bin param Signed-off-by: Kaloyan Nikolov --------- Signed-off-by: Kaloyan Nikolov Signed-off-by: J0WI Co-authored-by: J0WI --- .examples/README.md | 16 +-- .../{docker-compose.yml => compose.yaml} | 2 - .../fpm/{docker-compose.yml => compose.yaml} | 2 - .../insecure/mariadb/fpm/web/nginx.conf | 29 ++-- .../{docker-compose.yml => compose.yaml} | 4 +- .../fpm/{docker-compose.yml => compose.yaml} | 4 +- .../insecure/postgres/fpm/web/nginx.conf | 28 ++-- .../{docker-compose.yml => compose.yaml} | 14 +- .../fpm/{docker-compose.yml => compose.yaml} | 7 +- .../mariadb/fpm/web/nginx.conf | 28 ++-- .../{docker-compose.yml => compose.yaml} | 7 +- .../fpm/{docker-compose.yml => compose.yaml} | 5 +- .../postgres/fpm/web/nginx.conf | 28 ++-- README.md | 124 +++++++++--------- 14 files changed, 144 insertions(+), 154 deletions(-) rename .examples/docker-compose/insecure/mariadb/apache/{docker-compose.yml => compose.yaml} (98%) rename .examples/docker-compose/insecure/mariadb/fpm/{docker-compose.yml => compose.yaml} (98%) rename .examples/docker-compose/insecure/postgres/apache/{docker-compose.yml => compose.yaml} (96%) rename .examples/docker-compose/insecure/postgres/fpm/{docker-compose.yml => compose.yaml} (93%) rename .examples/docker-compose/with-nginx-proxy/mariadb/apache/{docker-compose.yml => compose.yaml} (81%) rename .examples/docker-compose/with-nginx-proxy/mariadb/fpm/{docker-compose.yml => compose.yaml} (94%) rename .examples/docker-compose/with-nginx-proxy/postgres/apache/{docker-compose.yml => compose.yaml} (93%) rename .examples/docker-compose/with-nginx-proxy/postgres/fpm/{docker-compose.yml => compose.yaml} (94%) diff --git a/.examples/README.md b/.examples/README.md index 64b694b5..52603fe8 100644 --- a/.examples/README.md +++ b/.examples/README.md @@ -66,9 +66,9 @@ The following Dockerfile commands are also necessary for a sucessfull cron insta ## docker-compose In `docker-compose` additional services are bundled to create a complete nextcloud installation. The examples are designed to run out-of-the-box. -Before running the examples you have to modify the `db.env` and `docker-compose.yml` file and fill in your custom information. +Before running the examples you have to modify the `db.env` and `compose.yaml` file and fill in your custom information. -The docker-compose examples make heavily use of derived Dockerfiles to add configuration files into the containers. This way they should also work on remote docker systems as _Docker for Windows_. When running docker-compose on the same host as the docker daemon, another possibility would be to simply mount the files in the volumes section in the `docker-compose.yml` file. +The docker compose examples make heavily use of derived Dockerfiles to add configuration files into the containers. This way they should also work on remote docker systems as _Docker for Windows_. When running docker compose on the same host as the docker daemon, another possibility would be to simply mount the files in the volumes section in the `compose.yaml` file. ### insecure @@ -78,10 +78,10 @@ For this use one of the [with-nginx-proxy](#with-nginx-proxy) examples. To use this example complete the following steps: -1. if you use mariadb or mysql choose a root password for the database in `docker-compose.yml` behind `MYSQL_ROOT_PASSWORD=` +1. if you use mariadb or mysql choose a root password for the database in `compose.yaml` behind `MYSQL_ROOT_PASSWORD=` 2. choose a password for the database user nextcloud in `db.env` behind `MYSQL_PASSWORD=` (for mariadb/mysql) or `POSTGRES_PASSWORD=` (for postgres) -3. run `docker-compose build --pull` to pull the most recent base images and build the custom dockerfiles -4. start nextcloud with `docker-compose up -d` +3. run `docker compose build --pull` to pull the most recent base images and build the custom dockerfiles +4. start nextcloud with `docker compose up -d` If you want to update your installation to a newer version of nextcloud, repeat the steps 3 and 4. @@ -97,13 +97,13 @@ This combination of the [nginxproxy/nginx-proxy](https://github.com/nginx-proxy/ To use this example complete the following steps: -1. open `docker-compose.yml` +1. open `compose.yaml` 1. insert your nextcloud domain behind `VIRTUAL_HOST=`and `LETSENCRYPT_HOST=` 2. enter a valid email behind `LETSENCRYPT_EMAIL=` 3. if you use mariadb or mysql choose a root password for the database behind `MYSQL_ROOT_PASSWORD=` 2. choose a password for the database user nextcloud in `db.env` behind `MYSQL_PASSWORD=` (for mariadb/mysql) or `POSTGRES_PASSWORD=` (for postgres) -3. run `docker-compose build --pull` to pull the most recent base images and build the custom dockerfiles -4. start nextcloud with `docker-compose up -d` +3. run `docker compose build --pull` to pull the most recent base images and build the custom dockerfiles +4. start nextcloud with `docker compose up -d` If you want to update your installation to a newer version of nextcloud, repeat the steps 3 and 4. diff --git a/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml b/.examples/docker-compose/insecure/mariadb/apache/compose.yaml similarity index 98% rename from .examples/docker-compose/insecure/mariadb/apache/docker-compose.yml rename to .examples/docker-compose/insecure/mariadb/apache/compose.yaml index 11ff5bf9..775c35ef 100644 --- a/.examples/docker-compose/insecure/mariadb/apache/docker-compose.yml +++ b/.examples/docker-compose/insecure/mariadb/apache/compose.yaml @@ -1,5 +1,3 @@ -version: '3' - services: db: image: mariadb:10.6 diff --git a/.examples/docker-compose/insecure/mariadb/fpm/docker-compose.yml b/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml similarity index 98% rename from .examples/docker-compose/insecure/mariadb/fpm/docker-compose.yml rename to .examples/docker-compose/insecure/mariadb/fpm/compose.yaml index e293a92c..846cdaa3 100644 --- a/.examples/docker-compose/insecure/mariadb/fpm/docker-compose.yml +++ b/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml @@ -1,5 +1,3 @@ -version: '3' - services: db: image: mariadb:10.6 diff --git a/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf b/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf index 42e49a1e..5dff3389 100644 --- a/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf +++ b/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf @@ -12,6 +12,9 @@ events { http { include mime.types; default_type application/octet-stream; + types { + text/javascript mjs; + } log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' @@ -30,7 +33,7 @@ http { # Set the `immutable` cache control options only for assets with a cache busting `v` argument map $arg_v $asset_immutable { "" ""; - default "immutable"; + default ", immutable"; } #gzip on; @@ -162,24 +165,16 @@ http { fastcgi_max_temp_file_size 0; } - # Javascript mimetype fixes for nginx - # Note: The block below should be removed, and the js|mjs section should be - # added to the block below this one. This is a temporary fix until Nginx - # upstream fixes the js mime-type - location ~* \.(?:js|mjs)$ { - types { - text/javascript js mjs; - } - default_type "text/javascript"; - try_files $uri /index.php$request_uri; - add_header Cache-Control "public, max-age=15778463, $asset_immutable"; - access_log off; - } - # Serve static files - location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { + location ~ \.(?:css|svg|js|mjs|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { try_files $uri /index.php$request_uri; - add_header Cache-Control "public, max-age=15778463, $asset_immutable"; + add_header Cache-Control "public, max-age=15778463$asset_immutable"; + add_header Referrer-Policy "no-referrer" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-Frame-Options "SAMEORIGIN" always; + add_header X-Permitted-Cross-Domain-Policies "none" always; + add_header X-Robots-Tag "noindex, nofollow" always; + add_header X-XSS-Protection "1; mode=block" always; access_log off; # Optional: Don't log access to assets location ~ \.wasm$ { diff --git a/.examples/docker-compose/insecure/postgres/apache/docker-compose.yml b/.examples/docker-compose/insecure/postgres/apache/compose.yaml similarity index 96% rename from .examples/docker-compose/insecure/postgres/apache/docker-compose.yml rename to .examples/docker-compose/insecure/postgres/apache/compose.yaml index 0a48bd05..646261d0 100644 --- a/.examples/docker-compose/insecure/postgres/apache/docker-compose.yml +++ b/.examples/docker-compose/insecure/postgres/apache/compose.yaml @@ -1,5 +1,3 @@ -version: '3' - services: db: image: postgres:alpine @@ -41,4 +39,4 @@ services: volumes: db: - nextcloud: + nextcloud: \ No newline at end of file diff --git a/.examples/docker-compose/insecure/postgres/fpm/docker-compose.yml b/.examples/docker-compose/insecure/postgres/fpm/compose.yaml similarity index 93% rename from .examples/docker-compose/insecure/postgres/fpm/docker-compose.yml rename to .examples/docker-compose/insecure/postgres/fpm/compose.yaml index 97343ad9..b5071d5c 100644 --- a/.examples/docker-compose/insecure/postgres/fpm/docker-compose.yml +++ b/.examples/docker-compose/insecure/postgres/fpm/compose.yaml @@ -1,11 +1,9 @@ -version: '3' - services: db: image: postgres:alpine restart: always volumes: - - db:/var/lib/postgresql/data:z + - db:/var/lib/postgresql/data:Z env_file: - db.env diff --git a/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf b/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf index b1c72e5f..5dff3389 100644 --- a/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf +++ b/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf @@ -12,6 +12,9 @@ events { http { include mime.types; default_type application/octet-stream; + types { + text/javascript mjs; + } log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' @@ -30,7 +33,7 @@ http { # Set the `immutable` cache control options only for assets with a cache busting `v` argument map $arg_v $asset_immutable { "" ""; - default "immutable"; + default ", immutable"; } #gzip on; @@ -162,23 +165,16 @@ http { fastcgi_max_temp_file_size 0; } - # Javascript mimetype fixes for nginx - # Note: The block below should be removed, and the js|mjs section should be - # added to the block below this one. This is a temporary fix until Nginx - # upstream fixes the js mime-type - location ~* \.(?:js|mjs)$ { - types { - text/javascript js mjs; - } - try_files $uri /index.php$request_uri; - add_header Cache-Control "public, max-age=15778463, $asset_immutable"; - access_log off; - } - # Serve static files - location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { + location ~ \.(?:css|svg|js|mjs|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { try_files $uri /index.php$request_uri; - add_header Cache-Control "public, max-age=15778463, $asset_immutable"; + add_header Cache-Control "public, max-age=15778463$asset_immutable"; + add_header Referrer-Policy "no-referrer" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-Frame-Options "SAMEORIGIN" always; + add_header X-Permitted-Cross-Domain-Policies "none" always; + add_header X-Robots-Tag "noindex, nofollow" always; + add_header X-XSS-Protection "1; mode=block" always; access_log off; # Optional: Don't log access to assets location ~ \.wasm$ { diff --git a/.examples/docker-compose/with-nginx-proxy/mariadb/apache/docker-compose.yml b/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml similarity index 81% rename from .examples/docker-compose/with-nginx-proxy/mariadb/apache/docker-compose.yml rename to .examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml index b88a3594..98f2ec46 100644 --- a/.examples/docker-compose/with-nginx-proxy/mariadb/apache/docker-compose.yml +++ b/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml @@ -1,5 +1,3 @@ -version: '3' - services: db: image: mariadb:10.6 @@ -34,6 +32,10 @@ services: depends_on: - db - redis + # Added proxy container dependency below. + # It is unclear on when or why it happens, but sometimes NC manages to start before the proxy + # and it breaks for whatever weird reason resulting in the need of manual proxy container restart. + - proxy networks: - proxy-tier - default @@ -55,11 +57,12 @@ services: - 80:80 - 443:443 labels: - com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" + - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy" volumes: - - certs:/etc/nginx/certs:z,ro + - certs:/etc/nginx/certs:ro,z - vhost.d:/etc/nginx/vhost.d:z - html:/usr/share/nginx/html:z + - dhparam:/etc/nginx/dhparam:z - /var/run/docker.sock:/tmp/docker.sock:z,ro networks: - proxy-tier @@ -67,6 +70,8 @@ services: letsencrypt-companion: image: nginxproxy/acme-companion restart: always + environment: + - DEFAULT_EMAIL= volumes: - certs:/etc/nginx/certs:z - acme:/etc/acme.sh:z @@ -100,6 +105,7 @@ volumes: acme: vhost.d: html: + dhparam: networks: proxy-tier: diff --git a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/docker-compose.yml b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml similarity index 94% rename from .examples/docker-compose/with-nginx-proxy/mariadb/fpm/docker-compose.yml rename to .examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml index 94196e9f..863d0ac4 100644 --- a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/docker-compose.yml +++ b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml @@ -1,5 +1,3 @@ -version: '3' - services: db: image: mariadb:10.6 @@ -31,6 +29,7 @@ services: depends_on: - db - redis + - proxy web: build: ./web @@ -64,7 +63,7 @@ services: - 80:80 - 443:443 labels: - com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" + - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy" volumes: - certs:/etc/nginx/certs:z,ro - vhost.d:/etc/nginx/vhost.d:z @@ -76,6 +75,8 @@ services: letsencrypt-companion: image: nginxproxy/acme-companion restart: always + environment: + - DEFAULT_EMAIL= volumes: - certs:/etc/nginx/certs:z - acme:/etc/acme.sh:z diff --git a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf index 01c28564..02215270 100644 --- a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf +++ b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf @@ -12,6 +12,9 @@ events { http { include mime.types; default_type application/octet-stream; + types { + text/javascript mjs; + } log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' @@ -30,7 +33,7 @@ http { # Set the `immutable` cache control options only for assets with a cache busting `v` argument map $arg_v $asset_immutable { "" ""; - default "immutable"; + default ", immutable"; } #gzip on; @@ -162,23 +165,16 @@ http { fastcgi_max_temp_file_size 0; } - # Javascript mimetype fixes for nginx - # Note: The block below should be removed, and the js|mjs section should be - # added to the block below this one. This is a temporary fix until Nginx - # upstream fixes the js mime-type - location ~* \.(?:js|mjs)$ { - types { - text/javascript js mjs; - } - try_files $uri /index.php$request_uri; - add_header Cache-Control "public, max-age=15778463, $asset_immutable"; - access_log off; - } - # Serve static files - location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { + location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { try_files $uri /index.php$request_uri; - add_header Cache-Control "public, max-age=15778463, $asset_immutable"; + add_header Cache-Control "public, max-age=15778463$asset_immutable"; + add_header Referrer-Policy "no-referrer" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-Frame-Options "SAMEORIGIN" always; + add_header X-Permitted-Cross-Domain-Policies "none" always; + add_header X-Robots-Tag "noindex, nofollow" always; + add_header X-XSS-Protection "1; mode=block" always; access_log off; # Optional: Don't log access to assets location ~ \.wasm$ { diff --git a/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml b/.examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml similarity index 93% rename from .examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml rename to .examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml index 243e06cf..a3dece4b 100644 --- a/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml +++ b/.examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml @@ -1,5 +1,3 @@ -version: '3' - services: db: image: postgres:alpine @@ -29,6 +27,7 @@ services: depends_on: - db - redis + - proxy networks: - proxy-tier - default @@ -50,9 +49,9 @@ services: - 80:80 - 443:443 labels: - com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" + - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy" volumes: - - certs:/etc/nginx/certs:z,ro + - certs:/etc/nginx/certs:ro,z - vhost.d:/etc/nginx/vhost.d:z - html:/usr/share/nginx/html:z - /var/run/docker.sock:/tmp/docker.sock:z,ro diff --git a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/docker-compose.yml b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/compose.yaml similarity index 94% rename from .examples/docker-compose/with-nginx-proxy/postgres/fpm/docker-compose.yml rename to .examples/docker-compose/with-nginx-proxy/postgres/fpm/compose.yaml index 008d74af..09a80e7d 100644 --- a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/docker-compose.yml +++ b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/compose.yaml @@ -26,6 +26,7 @@ services: depends_on: - db - redis + - proxy web: build: ./web @@ -59,7 +60,7 @@ services: - 80:80 - 443:443 labels: - com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" + - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy" volumes: - certs:/etc/nginx/certs:z,ro - vhost.d:/etc/nginx/vhost.d:z @@ -77,6 +78,8 @@ services: - vhost.d:/etc/nginx/vhost.d:z - html:/usr/share/nginx/html:z - /var/run/docker.sock:/var/run/docker.sock:z,ro + environment: + - DEFAULT_EMAIL= networks: - proxy-tier depends_on: diff --git a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf index 01c28564..d7d29c68 100644 --- a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf +++ b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf @@ -12,6 +12,9 @@ events { http { include mime.types; default_type application/octet-stream; + types { + text/javascript mjs; + } log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' @@ -30,7 +33,7 @@ http { # Set the `immutable` cache control options only for assets with a cache busting `v` argument map $arg_v $asset_immutable { "" ""; - default "immutable"; + default ", immutable"; } #gzip on; @@ -162,23 +165,16 @@ http { fastcgi_max_temp_file_size 0; } - # Javascript mimetype fixes for nginx - # Note: The block below should be removed, and the js|mjs section should be - # added to the block below this one. This is a temporary fix until Nginx - # upstream fixes the js mime-type - location ~* \.(?:js|mjs)$ { - types { - text/javascript js mjs; - } - try_files $uri /index.php$request_uri; - add_header Cache-Control "public, max-age=15778463, $asset_immutable"; - access_log off; - } - # Serve static files - location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { + location ~ \.(?:css|svg|js|mjs|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { try_files $uri /index.php$request_uri; - add_header Cache-Control "public, max-age=15778463, $asset_immutable"; + add_header Cache-Control "public, max-age=15778463$asset_immutable"; + add_header Referrer-Policy "no-referrer" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-Frame-Options "SAMEORIGIN" always; + add_header X-Permitted-Cross-Domain-Policies "none" always; + add_header X-Robots-Tag "noindex, nofollow" always; + add_header X-XSS-Protection "1; mode=block" always; access_log off; # Optional: Don't log access to assets location ~ \.wasm$ { diff --git a/README.md b/README.md index b9f7a66d..e434f0a8 100644 --- a/README.md +++ b/README.md @@ -38,16 +38,16 @@ Now you can access Nextcloud at http://localhost:8080/ from your host system. ## Using the fpm image -To use the fpm image, you need an additional web server, such as [nginx](https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html), that can proxy http-request to the fpm-port of the container. For fpm connection this container exposes port 9000. In most cases, you might want to use another container or your host as proxy. If you use your host you can address your Nextcloud container directly on port 9000. If you use another container, make sure that you add them to the same docker network (via `docker run --network ...` or a `docker-compose` file). In both cases you don't want to map the fpm port to your host. +To use the fpm image, you need an additional web server, such as [nginx](https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html), that can proxy http-request to the fpm-port of the container. For fpm connection this container exposes port 9000. In most cases, you might want to use another container or your host as proxy. If you use your host you can address your Nextcloud container directly on port 9000. If you use another container, make sure that you add them to the same docker network (via `docker run --network ...` or a `docker compose` file). In both cases you don't want to map the fpm port to your host. ```console $ docker run -d nextcloud:fpm ``` -As the fastCGI-Process is not capable of serving static files (style sheets, images, ...), the webserver needs access to these files. This can be achieved with the `volumes-from` option. You can find more information in the [docker-compose section](#running-this-image-with-docker-compose). +As the fastCGI-Process is not capable of serving static files (style sheets, images, ...), the webserver needs access to these files. This can be achieved with the `volumes-from` option. You can find more information in the [docker compose section](#running-this-image-with-docker-compose). ## Using an external database -By default, this container uses SQLite for data storage but the Nextcloud setup wizard (appears on first run) allows connecting to an existing MySQL/MariaDB or PostgreSQL database. You can also link a database container, e. g. `--link my-mysql:mysql`, and then use `mysql` as the database host on setup. More info is in the docker-compose section. +By default, this container uses SQLite for data storage but the Nextcloud setup wizard (appears on first run) allows connecting to an existing MySQL/MariaDB or PostgreSQL database. You can also link a database container, e. g. `--link my-mysql:mysql`, and then use `mysql` as the database host on setup. More info is in the docker compose section. ## Persistent data The Nextcloud installation and all data beyond what lives in the database (file uploads, etc.) are stored in the [unnamed docker volume](https://docs.docker.com/engine/tutorials/dockervolumes/#adding-a-data-volume) volume `/var/www/html`. The docker daemon will store that data within the docker directory `/var/lib/docker/volumes/...`. That means your data is saved even if the container crashes, is stopped or deleted. @@ -100,8 +100,7 @@ If mounting additional volumes under `/var/www/html`, you should consider: - Confirming that [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude) contains the files and folders that should persist during installation and upgrades; or - Mounting storage volumes to locations outside of `/var/www/html`. -> [!WARNING] -> You should note that data inside the main folder (`/var/www/html`) will be overridden/removed during installation and upgrades, unless listed in [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude). The additional volumes officially supported are already in that list, but custom volumes will need to be added by you. We suggest mounting custom storage volumes outside of `/var/www/html` and if possible read-only so that making this adjustment is unnecessary. If you must do so, however, you may build a custom image with a modified `/upgrade.exclude` file that incorporates your custom volume(s). +You should note that data inside the main folder (`/var/www/html`) will be overridden/removed during installation and upgrades, unless listed in [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude). The additional volumes officially supported are already in that list, but custom volumes will need to be added by you. We suggest mounting custom storage volumes outside of `/var/www/html` and if possible read-only so that making this adjustment is unnecessary. If you must do so, however, you may build a custom image with a modified `/upgrade.exclude` file that incorporates your custom volume(s). ## Using the Nextcloud command-line interface @@ -109,9 +108,9 @@ To use the [Nextcloud command-line interface](https://docs.nextcloud.com/server/ ```console $ docker exec --user www-data CONTAINER_ID php occ ``` -or for docker-compose: +or for docker compose: ```console -$ docker-compose exec --user www-data app php occ +$ docker compose exec --user www-data app php occ ``` ## Auto configuration via environment variables @@ -155,7 +154,7 @@ You might want to make sure the htaccess is up to date after each container upda - `NEXTCLOUD_INIT_HTACCESS` (not set by default) Set it to true to enable run `occ maintenance:update:htaccess` after container initialization. -If you want to use Redis you have to create a separate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your docker-compose file. To inform Nextcloud about the Redis container, pass in the following parameters: +If you want to use Redis you have to create a separate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your docker compose file. To inform Nextcloud about the Redis container, pass in the following parameters: - `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. @@ -282,23 +281,17 @@ Check the [Nexcloud documentation](https://docs.nextcloud.com/server/latest/admi Keep in mind that once set, removing these environment variables won't remove these values from the configuration file, due to how Nextcloud merges configuration files together. -# Running this image with docker-compose -The easiest way to get a fully featured and functional setup is using a `docker-compose` file. There are too many different possibilities to setup your system, so here are only some examples of what you have to look for. +# Running this image with docker compose +The easiest way to get a fully featured and functional setup is using a `compose.yaml` file. There are too many different possibilities to setup your system, so here are only some examples of what you have to look for. At first, make sure you have chosen the right base image (fpm or apache) and added features you wanted (see below). In every case, you would want to add a database container and docker volumes to get easy access to your persistent data. When you want to have your server reachable from the internet, adding HTTPS-encryption is mandatory! See below for more information. ## Base version - apache -This version will use the apache image and add a mariaDB container. The volumes are set to keep your data persistent. This setup provides **no ssl encryption** and is intended to run behind a proxy. +This version will use the apache variant and add a MariaDB container. The volumes are set to keep your data persistent. This setup provides **no TLS encryption** and is intended to run behind a proxy. Make sure to pass in values for `MYSQL_ROOT_PASSWORD` and `MYSQL_PASSWORD` variables before you run this setup. ```yaml -version: '2' - -volumes: - nextcloud: - db: - services: db: image: mariadb:10.6 @@ -312,12 +305,17 @@ services: - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud + redis: + image: redis:alpine + restart: always + app: image: nextcloud restart: always ports: - 8080:80 - links: + depends_on: + - redis - db volumes: - nextcloud:/var/www/html @@ -327,24 +325,21 @@ services: - MYSQL_USER=nextcloud - MYSQL_HOST=db +volumes: + nextcloud: + db: ``` -Then run `docker-compose up -d`, now you can access Nextcloud at http://localhost:8080/ from your host system. +Then run `docker compose up -d`, now you can access Nextcloud at http://localhost:8080/ from your host system. ## Base version - FPM -When using the FPM image, you need another container that acts as web server on port 80 and proxies the requests to the Nextcloud container. In this example a simple nginx container is combined with the Nextcloud-fpm image and a MariaDB database container. The data is stored in docker volumes. The nginx container also needs access to static files from your Nextcloud installation. It gets access to all the volumes mounted to Nextcloud via the `volumes_from` option. The configuration for nginx is stored in the configuration file `nginx.conf`, that is mounted into the container. An example can be found in the examples section [here](https://github.com/nextcloud/docker/tree/master/.examples). +When using the FPM image, you need another container that acts as web server on port 80 and proxies the requests to the Nextcloud container. In this example a simple nginx container is combined with the Nextcloud-fpm image and a MariaDB database container. The data is stored in docker volumes. The nginx container also needs access to static files from your Nextcloud installation. It gets access to all the volumes mounted to Nextcloud via the `volumes` option. The configuration for nginx is stored in the configuration file `nginx.conf`, that is mounted into the container. An example can be found in the examples section [here](https://github.com/nextcloud/docker/tree/master/.examples). -As this setup does **not include encryption**, it should be run behind a proxy. +This setup provides **no TLS encryption** and is intended to run behind a proxy. Make sure to pass in values for `MYSQL_ROOT_PASSWORD` and `MYSQL_PASSWORD` variables before you run this setup. ```yaml -version: '2' - -volumes: - nextcloud: - db: - services: db: image: mariadb:10.6 @@ -358,10 +353,15 @@ services: - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud + redis: + image: redis:alpine + restart: always + app: image: nextcloud:fpm restart: always - links: + depends_on: + - redis - db volumes: - nextcloud:/var/www/html @@ -376,21 +376,23 @@ services: restart: always ports: - 8080:80 - links: + depends_on: - app volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro volumes_from: - app + +volumes: + nextcloud: + db: ``` -Then run `docker-compose up -d`, now you can access Nextcloud at http://localhost:8080/ from your host system. +Then run `docker compose up -d`, now you can access Nextcloud at http://localhost:8080/ from your host system. # Docker Secrets As an alternative to passing sensitive information via environment variables, `_FILE` may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in `/run/secrets/` files. For example: ```yaml -version: '3.2' - services: db: image: postgres @@ -405,6 +407,9 @@ services: - postgres_db - postgres_password - postgres_user + redis: + image: redis:alpine + restart: always app: image: nextcloud @@ -421,6 +426,7 @@ services: - NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password - NEXTCLOUD_ADMIN_USER_FILE=/run/secrets/nextcloud_admin_user depends_on: + - redis - db secrets: - nextcloud_admin_password @@ -458,10 +464,10 @@ There are many different possibilities to introduce encryption depending on your We recommend using a reverse proxy in front of your Nextcloud installation. Your Nextcloud will only be reachable through the proxy, which encrypts all traffic to the clients. You can mount your manually generated certificates to the proxy or use a fully automated solution which generates and renews the certificates for you. -In our [examples](https://github.com/nextcloud/docker/tree/master/.examples) section we have an example for a fully automated setup using a reverse proxy, a container for [Let's Encrypt](https://letsencrypt.org/) certificate handling, database and Nextcloud. It uses the popular [nginx-proxy](https://github.com/jwilder/nginx-proxy) and [docker-letsencrypt-nginx-proxy-companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion) containers. Please check the according documentations before using this setup. +In our [examples](https://github.com/nextcloud/docker/tree/master/.examples) section we have an example for a fully automated setup using a reverse proxy, a container for [Let's Encrypt](https://letsencrypt.org/) certificate handling, database and Nextcloud. It uses the popular [nginx-proxy](https://github.com/nginx-proxy/nginx-proxy) and [acme-companion](https://github.com/nginx-proxy/acme-companion) containers. Please check the according documentations before using this setup. # First use -When you first access your Nextcloud, the setup wizard will appear and ask you to choose an administrator account username, password and the database connection. For the database use `db` as host and `nextcloud` as table and user name. Also enter the password you chose in your `docker-compose.yml` file. +When you first access your Nextcloud, the setup wizard will appear and ask you to choose an administrator account username, password and the database connection. For the database use `db` as host and `nextcloud` as table and user name. Also enter the password you chose in your `compose.yaml` file. # Update to a newer version Updating the Nextcloud container is done by pulling the new image, throwing away the old container and starting the new one. @@ -478,11 +484,11 @@ $ docker run -d nextcloud ``` Beware that you have to run the same command with the options that you used to initially start your Nextcloud. That includes volumes, port mapping. -When using docker-compose your compose file takes care of your configuration, so you just have to run: +When using docker compose your compose file takes care of your configuration, so you just have to run: ```console -$ docker-compose pull -$ docker-compose up -d +$ docker compose pull +$ docker compose up -d ``` @@ -497,13 +503,13 @@ RUN ... ``` The [examples folder](https://github.com/nextcloud/docker/blob/master/.examples) gives a few examples on how to add certain functionalities, like including the cron job, smb-support or imap-authentication. -If you use your own Dockerfile, you need to configure your docker-compose file accordingly. Switch out the `image` option with `build`. You have to specify the path to your Dockerfile. (in the example it's in the same directory next to the docker-compose file) +If you use your own Dockerfile, you need to configure your docker compose file accordingly. Switch out the `image` option with `build`. You have to specify the path to your Dockerfile. (in the example it's in the same directory next to the `compose.yaml` file) ```yaml app: build: . restart: always - links: + depends_on: - db volumes: - data:/var/www/html/data @@ -531,10 +537,10 @@ docker build -t your-name --pull . docker run -d your-name ``` -or for docker-compose: +or for docker compose: ```console -docker-compose build --pull -docker-compose up -d +docker compose build --pull +docker compose up -d ``` The `--pull` option tells docker to look for new versions of the base image. Then the build instructions inside your `Dockerfile` are run on top of the new image. @@ -542,19 +548,19 @@ The `--pull` option tells docker to look for new versions of the base image. The # Migrating an existing installation You're already using Nextcloud and want to switch to docker? Great! Here are some things to look out for: -1. Define your whole Nextcloud infrastructure in a `docker-compose` file and run it with `docker-compose up -d` to get the base installation, volumes and database. Work from there. -2. Restore your database from a mysqldump (nextcloud\_db\_1 is the name of your db container) +1. Define your whole Nextcloud infrastructure in a `compose.yaml` file and run it with `docker compose up -d` to get the base installation, volumes and database. Work from there. +2. Restore your database from a mysqldump (db is the name of your database container / service name) - To import from a MySQL dump use the following commands ```console - docker cp ./database.dmp nextcloud_db_1:/dmp - docker-compose exec db sh -c "mysql --user USER --password PASSWORD nextcloud < /dmp" - docker-compose exec db rm /dmp + docker compose cp ./database.dmp db:/dmp + docker compose exec db sh -c "mysql --user USER --password PASSWORD nextcloud < /dmp" + docker compose exec db rm /dmp ``` - To import from a PostgreSQL dump use to following commands ```console - docker cp ./database.dmp nextcloud_db_1:/dmp - docker-compose exec db sh -c "psql -U USER --set ON_ERROR_STOP=on nextcloud < /dmp" - docker-compose exec db rm /dmp + docker compose cp ./database.dmp db:/dmp + docker compose exec db sh -c "psql -U USER --set ON_ERROR_STOP=on nextcloud < /dmp" + docker compose exec db rm /dmp ``` 3. Edit your config.php 1. Set database connection @@ -595,14 +601,14 @@ You're already using Nextcloud and want to switch to docker? Great! Here are som ```php 'datadirectory' => '/var/www/html/data', ``` -4. Copy your data (nextcloud_app_1 is the name of your Nextcloud container): +4. Copy your data (`app` is the name of your Nextcloud container / service name): ```console - docker cp ./data/ nextcloud_app_1:/var/www/html/ - docker-compose exec app chown -R www-data:www-data /var/www/html/data - docker cp ./theming/ nextcloud_app_1:/var/www/html/ - docker-compose exec app chown -R www-data:www-data /var/www/html/theming - docker cp ./config/config.php nextcloud_app_1:/var/www/html/config - docker-compose exec app chown -R www-data:www-data /var/www/html/config + docker compose cp ./data/ app:/var/www/html/ + docker compose exec app chown -R www-data:www-data /var/www/html/data + docker compose cp ./theming/ app:/var/www/html/ + docker compose exec app chown -R www-data:www-data /var/www/html/theming + docker compose cp ./config/config.php app:/var/www/html/config + docker compose exec app chown -R www-data:www-data /var/www/html/config ``` If you want to preserve the metadata of your files like timestamps, copy the data directly on the host to the named volume using plain `cp` like this: ```console @@ -610,8 +616,8 @@ You're already using Nextcloud and want to switch to docker? Great! Here are som ``` 5. Copy only the custom apps you use (or simply redownload them from the web interface): ```console - docker cp ./custom_apps/ nextcloud_data:/var/www/html/ - docker-compose exec app chown -R www-data:www-data /var/www/html/custom_apps + docker compose cp ./custom_apps/ app:/var/www/html/ + docker compose exec app chown -R www-data:www-data /var/www/html/custom_apps ``` # Help (Questions / Issues) From c83d457857a3eddea4ab5ecdd25d1787237516ec Mon Sep 17 00:00:00 2001 From: Alexandra Branco Date: Mon, 7 Oct 2024 18:27:24 +0100 Subject: [PATCH 088/123] Added information about permissions errors (migrating to alpine) (#2289) * Added information about permissions errors when migrating docker images to alpine. * Updated README.md documentation after review. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index e434f0a8..b2ec983d 100644 --- a/README.md +++ b/README.md @@ -620,6 +620,16 @@ You're already using Nextcloud and want to switch to docker? Great! Here are som docker compose exec app chown -R www-data:www-data /var/www/html/custom_apps ``` +## Migrating from a non-Alpine image to an Alpine image + +If you already use one of our non-Alpine images, but want to switch to an Alpine-based image, you may experience permissions problems with your existing volumes. This is because the Alpine images uses a different user ID for `www-data`. +So, you must change the ownership of the `/var/www/html` (or `$NEXTCLOUD_DATA_DIR`) folder to be compatible with Alpine: + +```console +docker exec container-name chown -R www-data:root /var/www/html +``` + +After changing the permissions, restart the container and the permission errors should disappear. # Help (Questions / Issues) **If you have any questions or problems while using the image, please ask for assistance on the Help Forum first (https://help.nextcloud.com)**. From 5a242f605505e4389ee9b715f99df57abcbf81ef Mon Sep 17 00:00:00 2001 From: J0WI Date: Tue, 8 Oct 2024 15:33:18 +0200 Subject: [PATCH 089/123] MariaDB 10.11 (#2298) Signed-off-by: J0WI --- .../docker-compose/insecure/mariadb/apache/compose.yaml | 2 +- .examples/docker-compose/insecure/mariadb/fpm/compose.yaml | 2 +- .../with-nginx-proxy/mariadb/apache/compose.yaml | 2 +- .../with-nginx-proxy/mariadb/fpm/compose.yaml | 2 +- README.md | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.examples/docker-compose/insecure/mariadb/apache/compose.yaml b/.examples/docker-compose/insecure/mariadb/apache/compose.yaml index 775c35ef..4d0fd8fd 100644 --- a/.examples/docker-compose/insecure/mariadb/apache/compose.yaml +++ b/.examples/docker-compose/insecure/mariadb/apache/compose.yaml @@ -1,6 +1,6 @@ services: db: - image: mariadb:10.6 + image: mariadb:10.11 command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW restart: always volumes: diff --git a/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml b/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml index 846cdaa3..06b12afb 100644 --- a/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml +++ b/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml @@ -1,6 +1,6 @@ services: db: - image: mariadb:10.6 + image: mariadb:10.11 command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW restart: always volumes: diff --git a/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml b/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml index 98f2ec46..7a221407 100644 --- a/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml +++ b/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml @@ -1,6 +1,6 @@ services: db: - image: mariadb:10.6 + image: mariadb:10.11 command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW restart: always volumes: diff --git a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml index 863d0ac4..ff7a5388 100644 --- a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml +++ b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml @@ -1,6 +1,6 @@ services: db: - image: mariadb:10.6 + image: mariadb:10.11 command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW restart: always volumes: diff --git a/README.md b/README.md index b2ec983d..abe5b25b 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Database: ```console $ docker run -d \ -v db:/var/lib/mysql \ -mariadb:10.6 +mariadb:10.11 ``` ### Additional volumes @@ -294,7 +294,7 @@ Make sure to pass in values for `MYSQL_ROOT_PASSWORD` and `MYSQL_PASSWORD` varia ```yaml services: db: - image: mariadb:10.6 + image: mariadb:10.11 restart: always command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW volumes: @@ -342,7 +342,7 @@ Make sure to pass in values for `MYSQL_ROOT_PASSWORD` and `MYSQL_PASSWORD` varia ```yaml services: db: - image: mariadb:10.6 + image: mariadb:10.11 restart: always command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW volumes: From 8c777a4144ff406db6adfe9d674e7411b2f8871e Mon Sep 17 00:00:00 2001 From: Kaloyan Nikolov Date: Tue, 8 Oct 2024 16:53:11 +0300 Subject: [PATCH 090/123] Update examples nginx configuration (#2307) * Update config based on the official docs Signed-off-by: Kaloyan Nikolov * Update all example nginx configs according to the documentation Signed-off-by: Kaloyan Nikolov --------- Signed-off-by: Kaloyan Nikolov --- .examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf | 5 +++-- .../docker-compose/insecure/postgres/fpm/web/nginx.conf | 5 +++-- .../with-nginx-proxy/mariadb/fpm/web/nginx.conf | 5 +++-- .../with-nginx-proxy/postgres/fpm/web/nginx.conf | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf b/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf index 5dff3389..1dd6e11d 100644 --- a/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf +++ b/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf @@ -14,6 +14,7 @@ http { default_type application/octet-stream; types { text/javascript mjs; + application/wasm wasm; } log_format main '$remote_addr - $remote_user [$time_local] "$request" ' @@ -143,7 +144,7 @@ http { # to the URI, resulting in a HTTP 500 error response. location ~ \.php(?:$|/) { # Required for legacy support - rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri; + rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri; fastcgi_split_path_info ^(.+?\.php)(/.*)$; set $path_info $fastcgi_path_info; @@ -166,7 +167,7 @@ http { } # Serve static files - location ~ \.(?:css|svg|js|mjs|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { + location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ { try_files $uri /index.php$request_uri; add_header Cache-Control "public, max-age=15778463$asset_immutable"; add_header Referrer-Policy "no-referrer" always; diff --git a/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf b/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf index 5dff3389..1dd6e11d 100644 --- a/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf +++ b/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf @@ -14,6 +14,7 @@ http { default_type application/octet-stream; types { text/javascript mjs; + application/wasm wasm; } log_format main '$remote_addr - $remote_user [$time_local] "$request" ' @@ -143,7 +144,7 @@ http { # to the URI, resulting in a HTTP 500 error response. location ~ \.php(?:$|/) { # Required for legacy support - rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri; + rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri; fastcgi_split_path_info ^(.+?\.php)(/.*)$; set $path_info $fastcgi_path_info; @@ -166,7 +167,7 @@ http { } # Serve static files - location ~ \.(?:css|svg|js|mjs|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { + location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ { try_files $uri /index.php$request_uri; add_header Cache-Control "public, max-age=15778463$asset_immutable"; add_header Referrer-Policy "no-referrer" always; diff --git a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf index 02215270..a3c9f28b 100644 --- a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf +++ b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf @@ -14,6 +14,7 @@ http { default_type application/octet-stream; types { text/javascript mjs; + application/wasm wasm; } log_format main '$remote_addr - $remote_user [$time_local] "$request" ' @@ -143,7 +144,7 @@ http { # to the URI, resulting in a HTTP 500 error response. location ~ \.php(?:$|/) { # Required for legacy support - rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri; + rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri; fastcgi_split_path_info ^(.+?\.php)(/.*)$; set $path_info $fastcgi_path_info; @@ -166,7 +167,7 @@ http { } # Serve static files - location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { + location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ { try_files $uri /index.php$request_uri; add_header Cache-Control "public, max-age=15778463$asset_immutable"; add_header Referrer-Policy "no-referrer" always; diff --git a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf index d7d29c68..a3c9f28b 100644 --- a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf +++ b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf @@ -14,6 +14,7 @@ http { default_type application/octet-stream; types { text/javascript mjs; + application/wasm wasm; } log_format main '$remote_addr - $remote_user [$time_local] "$request" ' @@ -143,7 +144,7 @@ http { # to the URI, resulting in a HTTP 500 error response. location ~ \.php(?:$|/) { # Required for legacy support - rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri; + rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /index.php$request_uri; fastcgi_split_path_info ^(.+?\.php)(/.*)$; set $path_info $fastcgi_path_info; @@ -166,7 +167,7 @@ http { } # Serve static files - location ~ \.(?:css|svg|js|mjs|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ { + location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ { try_files $uri /index.php$request_uri; add_header Cache-Control "public, max-age=15778463$asset_immutable"; add_header Referrer-Policy "no-referrer" always; From a9f9885e655bf1b16b7c8d3a5131ef161065492e Mon Sep 17 00:00:00 2001 From: Dominic Giebert Date: Tue, 8 Oct 2024 16:19:59 +0200 Subject: [PATCH 091/123] Add FORWARDED_FOR_HEADERS to the reverse-proxy config (#2272) * Add FORWARDED_FOR_HEADERS to the reverse-proxy config Signed-off-by: Dominic Giebert * Add FORWARDED_FOR_HEADERS to documentation Signed-off-by: Dominic Giebert --------- Signed-off-by: Dominic Giebert --- .config/reverse-proxy.config.php | 5 +++++ README.md | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.config/reverse-proxy.config.php b/.config/reverse-proxy.config.php index 7df0415e..30c660ff 100644 --- a/.config/reverse-proxy.config.php +++ b/.config/reverse-proxy.config.php @@ -28,3 +28,8 @@ $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); } + +$forwardedForHeaders = getenv('FORWARDED_FOR_HEADERS'); +if ($forwardedForHeaders) { + $CONFIG['forwarded_for_headers'] = array_filter(array_map('trim', explode(' ', $forwardedForHeaders))); +} diff --git a/README.md b/README.md index abe5b25b..d8f41dcb 100644 --- a/README.md +++ b/README.md @@ -261,7 +261,7 @@ To use the hooks triggered by the `entrypoint` script, either ``` -## Using the apache image behind a reverse proxy and auto configure server host and protocol +## Using the image behind a reverse proxy and auto configure server host and protocol The apache image will replace the remote addr (IP address visible to Nextcloud) with the IP address from `X-Real-IP` if the request is coming from a proxy in `10.0.0.0/8`, `172.16.0.0/12` or `192.168.0.0/16` by default. If you want Nextcloud to pick up the server host (`HTTP_X_FORWARDED_HOST`), protocol (`HTTP_X_FORWARDED_PROTO`) and client IP (`HTTP_X_FORWARDED_FOR`) from a trusted proxy, then disable rewrite IP and add the reverse proxy's IP address to `TRUSTED_PROXIES`. @@ -276,6 +276,7 @@ If the `TRUSTED_PROXIES` approach does not work for you, try using fixed values - `OVERWRITECLIURL` (empty by default): Set the cli url of the proxy (e.g. https://mydnsname.example.com) - `OVERWRITEWEBROOT` (empty by default): Set the absolute path of the proxy. - `OVERWRITECONDADDR` (empty by default): Regex to overwrite the values dependent on the remote address. +- `FORWARDED_FOR_HEADERS` (empty by default): HTTP headers with the original client IP address Check the [Nexcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html) for more details. From 6c1075b88d7184b067ce7c685ed55d136f7f0635 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Tue, 8 Oct 2024 14:20:13 +0000 Subject: [PATCH 092/123] Runs update.sh --- 28/apache/config/reverse-proxy.config.php | 5 +++++ 28/fpm-alpine/config/reverse-proxy.config.php | 5 +++++ 28/fpm/config/reverse-proxy.config.php | 5 +++++ 29/apache/config/reverse-proxy.config.php | 5 +++++ 29/fpm-alpine/config/reverse-proxy.config.php | 5 +++++ 29/fpm/config/reverse-proxy.config.php | 5 +++++ 30/apache/config/reverse-proxy.config.php | 5 +++++ 30/fpm-alpine/config/reverse-proxy.config.php | 5 +++++ 30/fpm/config/reverse-proxy.config.php | 5 +++++ 9 files changed, 45 insertions(+) diff --git a/28/apache/config/reverse-proxy.config.php b/28/apache/config/reverse-proxy.config.php index 7df0415e..30c660ff 100644 --- a/28/apache/config/reverse-proxy.config.php +++ b/28/apache/config/reverse-proxy.config.php @@ -28,3 +28,8 @@ $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); } + +$forwardedForHeaders = getenv('FORWARDED_FOR_HEADERS'); +if ($forwardedForHeaders) { + $CONFIG['forwarded_for_headers'] = array_filter(array_map('trim', explode(' ', $forwardedForHeaders))); +} diff --git a/28/fpm-alpine/config/reverse-proxy.config.php b/28/fpm-alpine/config/reverse-proxy.config.php index 7df0415e..30c660ff 100644 --- a/28/fpm-alpine/config/reverse-proxy.config.php +++ b/28/fpm-alpine/config/reverse-proxy.config.php @@ -28,3 +28,8 @@ $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); } + +$forwardedForHeaders = getenv('FORWARDED_FOR_HEADERS'); +if ($forwardedForHeaders) { + $CONFIG['forwarded_for_headers'] = array_filter(array_map('trim', explode(' ', $forwardedForHeaders))); +} diff --git a/28/fpm/config/reverse-proxy.config.php b/28/fpm/config/reverse-proxy.config.php index 7df0415e..30c660ff 100644 --- a/28/fpm/config/reverse-proxy.config.php +++ b/28/fpm/config/reverse-proxy.config.php @@ -28,3 +28,8 @@ $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); } + +$forwardedForHeaders = getenv('FORWARDED_FOR_HEADERS'); +if ($forwardedForHeaders) { + $CONFIG['forwarded_for_headers'] = array_filter(array_map('trim', explode(' ', $forwardedForHeaders))); +} diff --git a/29/apache/config/reverse-proxy.config.php b/29/apache/config/reverse-proxy.config.php index 7df0415e..30c660ff 100644 --- a/29/apache/config/reverse-proxy.config.php +++ b/29/apache/config/reverse-proxy.config.php @@ -28,3 +28,8 @@ $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); } + +$forwardedForHeaders = getenv('FORWARDED_FOR_HEADERS'); +if ($forwardedForHeaders) { + $CONFIG['forwarded_for_headers'] = array_filter(array_map('trim', explode(' ', $forwardedForHeaders))); +} diff --git a/29/fpm-alpine/config/reverse-proxy.config.php b/29/fpm-alpine/config/reverse-proxy.config.php index 7df0415e..30c660ff 100644 --- a/29/fpm-alpine/config/reverse-proxy.config.php +++ b/29/fpm-alpine/config/reverse-proxy.config.php @@ -28,3 +28,8 @@ $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); } + +$forwardedForHeaders = getenv('FORWARDED_FOR_HEADERS'); +if ($forwardedForHeaders) { + $CONFIG['forwarded_for_headers'] = array_filter(array_map('trim', explode(' ', $forwardedForHeaders))); +} diff --git a/29/fpm/config/reverse-proxy.config.php b/29/fpm/config/reverse-proxy.config.php index 7df0415e..30c660ff 100644 --- a/29/fpm/config/reverse-proxy.config.php +++ b/29/fpm/config/reverse-proxy.config.php @@ -28,3 +28,8 @@ $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); } + +$forwardedForHeaders = getenv('FORWARDED_FOR_HEADERS'); +if ($forwardedForHeaders) { + $CONFIG['forwarded_for_headers'] = array_filter(array_map('trim', explode(' ', $forwardedForHeaders))); +} diff --git a/30/apache/config/reverse-proxy.config.php b/30/apache/config/reverse-proxy.config.php index 7df0415e..30c660ff 100644 --- a/30/apache/config/reverse-proxy.config.php +++ b/30/apache/config/reverse-proxy.config.php @@ -28,3 +28,8 @@ $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); } + +$forwardedForHeaders = getenv('FORWARDED_FOR_HEADERS'); +if ($forwardedForHeaders) { + $CONFIG['forwarded_for_headers'] = array_filter(array_map('trim', explode(' ', $forwardedForHeaders))); +} diff --git a/30/fpm-alpine/config/reverse-proxy.config.php b/30/fpm-alpine/config/reverse-proxy.config.php index 7df0415e..30c660ff 100644 --- a/30/fpm-alpine/config/reverse-proxy.config.php +++ b/30/fpm-alpine/config/reverse-proxy.config.php @@ -28,3 +28,8 @@ $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); } + +$forwardedForHeaders = getenv('FORWARDED_FOR_HEADERS'); +if ($forwardedForHeaders) { + $CONFIG['forwarded_for_headers'] = array_filter(array_map('trim', explode(' ', $forwardedForHeaders))); +} diff --git a/30/fpm/config/reverse-proxy.config.php b/30/fpm/config/reverse-proxy.config.php index 7df0415e..30c660ff 100644 --- a/30/fpm/config/reverse-proxy.config.php +++ b/30/fpm/config/reverse-proxy.config.php @@ -28,3 +28,8 @@ $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); } + +$forwardedForHeaders = getenv('FORWARDED_FOR_HEADERS'); +if ($forwardedForHeaders) { + $CONFIG['forwarded_for_headers'] = array_filter(array_map('trim', explode(' ', $forwardedForHeaders))); +} From 178f8b65d34f49f649aa729de148c24a4d79db84 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Fri, 11 Oct 2024 00:32:21 +0000 Subject: [PATCH 093/123] Runs update.sh --- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/fpm/Dockerfile | 6 +++--- 29/apache/Dockerfile | 6 +++--- 29/fpm-alpine/Dockerfile | 6 +++--- 29/fpm/Dockerfile | 6 +++--- versions.json | 12 ++++++------ 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile index 5834feec..a9e4f152 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.10 +ENV NEXTCLOUD_VERSION 28.0.11 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-28.0.10.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index a03b7cbb..5d0f0eb5 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.10 +ENV NEXTCLOUD_VERSION 28.0.11 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index 00980561..b4531eee 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.10 +ENV NEXTCLOUD_VERSION 28.0.11 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-28.0.10.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.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/apache/Dockerfile b/29/apache/Dockerfile index 9cec1c9d..874348e8 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 29.0.7 +ENV NEXTCLOUD_VERSION 29.0.8 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.7.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.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 2469a6bb..bd0828e3 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.7 +ENV NEXTCLOUD_VERSION 29.0.8 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.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 b5836693..1b216522 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.7 +ENV NEXTCLOUD_VERSION 29.0.8 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.7.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.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/versions.json b/versions.json index 5e2fbdcb..241dc1c1 100644 --- a/versions.json +++ b/versions.json @@ -27,9 +27,9 @@ }, "29": { "branch": "29", - "version": "29.0.7", - "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.7.tar.bz2.asc", + "version": "29.0.8", + "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -53,9 +53,9 @@ }, "28": { "branch": "28", - "version": "28.0.10", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.10.tar.bz2.asc", + "version": "28.0.11", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From 53c3162c831d009ffe67dc50ff7229c9456664d4 Mon Sep 17 00:00:00 2001 From: Kaloyan Nikolov Date: Thu, 17 Oct 2024 22:17:18 +0300 Subject: [PATCH 094/123] Clarify Readme on bind volumes Signed-off-by: Kaloyan Nikolov --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d8f41dcb..eaf4940f 100644 --- a/README.md +++ b/README.md @@ -87,13 +87,36 @@ If you want to use named volumes for all of these, it would look like this: ```console $ docker run -d \ -v nextcloud:/var/www/html \ --v apps:/var/www/html/custom_apps \ +-v custom_apps:/var/www/html/custom_apps \ -v config:/var/www/html/config \ -v data:/var/www/html/data \ -v theme:/var/www/html/themes/ \ nextcloud ``` +If you'd prefer to use bind mounts instead of named volumes, for instance, when working with different device or network mounts for user data files and configuration: +```console +$ docker run -d \ +-v $(pwd)/nextcloud:/var/www/html \ +-v $(pwd)/custom_apps:/var/www/html/custom_apps \ +-v $(pwd)/config:/var/www/html/config \ +-v $(pwd)/data:/var/www/html/data \ +-v $(pwd)/theme:/var/www/html/themes/ \ +nextcloud +``` + +Here’s the same example using Docker's more detailed `--mount`. Note that with `-v` or `--volume`, the specified folders are created automatically if they don't exist. However, when using `--mount` for bind mounts, the directories must already exist on the host, or Docker will return an error. +```console +$ docker run -d \ +--mount type=bind,source=$(pwd)/nextcloud,target=/var/www/html \ +--mount type=bind,source=$(pwd)/custom_apps,target=/var/www/html/custom_apps \ +--mount type=bind,source=$(pwd)/config,target=/var/www/html/config \ +--mount type=bind,source=$(pwd)/data,target=/var/www/html/data \ +--mount type=bind,source=$(pwd)/theme,target=/var/www/html/themes/ \ +nextcloud +``` +The examples above use the current directory for bind mounts. If this isn't suitable, you can modify the paths by using either a relative or absolute path. Additionally, do not mix the `apps` and `custom_apps` folders. These folders contain different sets of apps, and mixing them will result in a broken installation. While upgrades\recovery may sometimes still be possible, this configuration is likely to cause issues. + ### Custom volumes If mounting additional volumes under `/var/www/html`, you should consider: From d03da64ac80d534c1b0ec69da3e6ddcc6af282a6 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Fri, 18 Oct 2024 00:32:25 +0000 Subject: [PATCH 095/123] Runs update.sh --- 28/apache/Dockerfile | 2 +- 28/fpm-alpine/Dockerfile | 2 +- 28/fpm/Dockerfile | 2 +- 29/apache/Dockerfile | 2 +- 29/fpm-alpine/Dockerfile | 2 +- 29/fpm/Dockerfile | 2 +- 30/apache/Dockerfile | 8 ++++---- 30/fpm-alpine/Dockerfile | 8 ++++---- 30/fpm/Dockerfile | 8 ++++---- latest.txt | 2 +- versions.json | 6 +++--- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile index a9e4f152..d63fb3a8 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -67,7 +67,7 @@ RUN set -ex; \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ + pecl install memcached-3.3.0; \ pecl install redis-6.1.0; \ \ docker-php-ext-enable \ diff --git a/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 5d0f0eb5..a7352299 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -65,7 +65,7 @@ RUN set -ex; \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ + pecl install memcached-3.3.0; \ pecl install redis-6.1.0; \ \ docker-php-ext-enable \ diff --git a/28/fpm/Dockerfile b/28/fpm/Dockerfile index b4531eee..ae69769d 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -67,7 +67,7 @@ RUN set -ex; \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ + pecl install memcached-3.3.0; \ pecl install redis-6.1.0; \ \ docker-php-ext-enable \ diff --git a/29/apache/Dockerfile b/29/apache/Dockerfile index 874348e8..8e9316c9 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -67,7 +67,7 @@ RUN set -ex; \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ + pecl install memcached-3.3.0; \ pecl install redis-6.1.0; \ \ docker-php-ext-enable \ diff --git a/29/fpm-alpine/Dockerfile b/29/fpm-alpine/Dockerfile index bd0828e3..5344aed5 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -65,7 +65,7 @@ RUN set -ex; \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ + pecl install memcached-3.3.0; \ pecl install redis-6.1.0; \ \ docker-php-ext-enable \ diff --git a/29/fpm/Dockerfile b/29/fpm/Dockerfile index 1b216522..a69317bb 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -67,7 +67,7 @@ RUN set -ex; \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ + pecl install memcached-3.3.0; \ pecl install redis-6.1.0; \ \ docker-php-ext-enable \ diff --git a/30/apache/Dockerfile b/30/apache/Dockerfile index abcd9e7c..b01d9611 100644 --- a/30/apache/Dockerfile +++ b/30/apache/Dockerfile @@ -67,7 +67,7 @@ RUN set -ex; \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ + pecl install memcached-3.3.0; \ pecl install redis-6.1.0; \ \ docker-php-ext-enable \ @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 30.0.0 +ENV NEXTCLOUD_VERSION 30.0.1 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.0.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.0.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.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 9a553d78..a6197cc8 100644 --- a/30/fpm-alpine/Dockerfile +++ b/30/fpm-alpine/Dockerfile @@ -65,7 +65,7 @@ RUN set -ex; \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ + pecl install memcached-3.3.0; \ pecl install redis-6.1.0; \ \ docker-php-ext-enable \ @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 30.0.0 +ENV NEXTCLOUD_VERSION 30.0.1 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.0.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.0.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.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 2877c10e..9ab2e055 100644 --- a/30/fpm/Dockerfile +++ b/30/fpm/Dockerfile @@ -67,7 +67,7 @@ RUN set -ex; \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.24; \ pecl install imagick-3.7.0; \ - pecl install memcached-3.2.0; \ + pecl install memcached-3.3.0; \ pecl install redis-6.1.0; \ \ docker-php-ext-enable \ @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 30.0.0 +ENV NEXTCLOUD_VERSION 30.0.1 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.0.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.0.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.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 8dd5c17a..1c8398ee 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -30.0.0 +30.0.1 diff --git a/versions.json b/versions.json index 241dc1c1..db86e255 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "30": { "branch": "30", - "version": "30.0.0", - "url": "https://download.nextcloud.com/server/releases/nextcloud-30.0.0.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-30.0.0.tar.bz2.asc", + "version": "30.0.1", + "url": "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From abd813f5fb0e5bba961f2029ad2eec06f73869a6 Mon Sep 17 00:00:00 2001 From: J0WI Date: Mon, 21 Oct 2024 16:44:25 +0000 Subject: [PATCH 096/123] Bump stable to 30.0.1 Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index a7718bc0..43c9aab0 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='29.0.7' +stable_channel='30.0.1' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From 9b63f3e4dccf071b5ffaf7b7d228d3a829e135da Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 21 Oct 2024 17:38:50 -0400 Subject: [PATCH 097/123] fix(examples): volumes must match (insecure-mariadb-apache) Signed-off-by: Josh --- .examples/docker-compose/insecure/mariadb/apache/compose.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.examples/docker-compose/insecure/mariadb/apache/compose.yaml b/.examples/docker-compose/insecure/mariadb/apache/compose.yaml index 4d0fd8fd..daa51590 100644 --- a/.examples/docker-compose/insecure/mariadb/apache/compose.yaml +++ b/.examples/docker-compose/insecure/mariadb/apache/compose.yaml @@ -23,6 +23,7 @@ services: - 127.0.0.1:8080:80 volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - MYSQL_HOST=db - REDIS_HOST=redis @@ -37,6 +38,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db From abf51f1cd76ba2d4f4c9598882e67bf03e2739a9 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 21 Oct 2024 17:43:54 -0400 Subject: [PATCH 098/123] fix(examples): volumes must match (insecure-mariadb-fpm) Signed-off-by: Josh --- .examples/docker-compose/insecure/mariadb/fpm/compose.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml b/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml index 06b12afb..25e5b717 100644 --- a/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml +++ b/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml @@ -21,6 +21,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - MYSQL_HOST=db - REDIS_HOST=redis @@ -37,6 +38,7 @@ services: - 127.0.0.1:8080:80 volumes: - nextcloud:/var/www/html:z,ro + # NOTE: The `volumes` included here should match those of the `app` container (unless you know what you're doing) depends_on: - app @@ -45,6 +47,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db From 9395077d115d88817618652603519b5f53bdd6aa Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 21 Oct 2024 17:45:19 -0400 Subject: [PATCH 099/123] fix(examples): volumes must match (insecure-postgres-apache) Signed-off-by: Josh --- .../docker-compose/insecure/postgres/apache/compose.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.examples/docker-compose/insecure/postgres/apache/compose.yaml b/.examples/docker-compose/insecure/postgres/apache/compose.yaml index 646261d0..19c75ba4 100644 --- a/.examples/docker-compose/insecure/postgres/apache/compose.yaml +++ b/.examples/docker-compose/insecure/postgres/apache/compose.yaml @@ -18,6 +18,7 @@ services: - 127.0.0.1:8080:80 volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - POSTGRES_HOST=db - REDIS_HOST=redis @@ -32,6 +33,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db @@ -39,4 +41,4 @@ services: volumes: db: - nextcloud: \ No newline at end of file + nextcloud: From e3dc1f3d62fcda80f35ae38a8748e75f3b50692e Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 21 Oct 2024 17:47:11 -0400 Subject: [PATCH 100/123] fix(examples): volumes must match (insecure-postgres-fpm) Signed-off-by: Josh --- .examples/docker-compose/insecure/postgres/fpm/compose.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.examples/docker-compose/insecure/postgres/fpm/compose.yaml b/.examples/docker-compose/insecure/postgres/fpm/compose.yaml index b5071d5c..4e268cab 100644 --- a/.examples/docker-compose/insecure/postgres/fpm/compose.yaml +++ b/.examples/docker-compose/insecure/postgres/fpm/compose.yaml @@ -16,6 +16,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - POSTGRES_HOST=db - REDIS_HOST=redis @@ -32,6 +33,7 @@ services: - 127.0.0.1:8080:80 volumes: - nextcloud:/var/www/html:z,ro + # NOTE: The `volumes` included here should match those of the `app` container (unless you know what you're doing) depends_on: - app @@ -40,6 +42,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db From 60f205abeab9ad60df5d9a44cf8bdc8fa5536a73 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 21 Oct 2024 17:49:39 -0400 Subject: [PATCH 101/123] fix(examples): volumes must match (with-nginx-proxy-mariadb-apache) Signed-off-by: Josh --- .../docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml b/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml index 7a221407..2a0d57a5 100644 --- a/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml +++ b/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml @@ -21,6 +21,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - VIRTUAL_HOST= - LETSENCRYPT_HOST= @@ -45,6 +46,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db From 7e188da4fa2f24edf41dd0efee49a2cdf3105eff Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 21 Oct 2024 17:51:06 -0400 Subject: [PATCH 102/123] fix(examples): volumes must match (with-nginx-proxy-mariadb-fpm) Signed-off-by: Josh --- .../docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml index ff7a5388..20db19a9 100644 --- a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml +++ b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml @@ -21,6 +21,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - MYSQL_HOST=db - REDIS_HOST=redis @@ -36,6 +37,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z,ro + # NOTE: The `volumes` included here should match those of the `app` container (unless you know what you're doing) environment: - VIRTUAL_HOST= - LETSENCRYPT_HOST= @@ -51,6 +53,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db From 24b67696829f015a2d7a03b4be9b190aeb274ca6 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 21 Oct 2024 17:52:21 -0400 Subject: [PATCH 103/123] fix(examples): volumes must match (with-nginx-proxy-postgres-apache) Signed-off-by: Josh --- .../with-nginx-proxy/postgres/apache/compose.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml b/.examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml index a3dece4b..2eb4f638 100644 --- a/.examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml +++ b/.examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml @@ -16,6 +16,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - VIRTUAL_HOST= - LETSENCRYPT_HOST= @@ -37,6 +38,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db From 9b245ac4a1c401a9890bd8ffa903058d2c83cf20 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 21 Oct 2024 17:53:55 -0400 Subject: [PATCH 104/123] fix(examples): volumes must match (with-nginx-proxy-postgres-fpm) Signed-off-by: Josh --- .../docker-compose/with-nginx-proxy/postgres/fpm/compose.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/compose.yaml b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/compose.yaml index 09a80e7d..80be65a6 100644 --- a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/compose.yaml +++ b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/compose.yaml @@ -18,6 +18,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - POSTGRES_HOST=db - REDIS_HOST=redis @@ -33,6 +34,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z,ro + # NOTE: The `volumes` included here should match those of the `app` container (unless you know what you're doing) environment: - VIRTUAL_HOST= - LETSENCRYPT_HOST= @@ -48,6 +50,7 @@ services: restart: always volumes: - nextcloud:/var/www/html:z + # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db From 0ee77f1a929147dc6ab9a50a32a699f377cd4d0b Mon Sep 17 00:00:00 2001 From: Kaloyan Nikolov Date: Tue, 22 Oct 2024 02:02:06 +0300 Subject: [PATCH 105/123] Clarify apps and custom_apps Co-authored-by: Josh Signed-off-by: Kaloyan Nikolov --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eaf4940f..bbe7ee7b 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,9 @@ $ docker run -d \ --mount type=bind,source=$(pwd)/theme,target=/var/www/html/themes/ \ nextcloud ``` -The examples above use the current directory for bind mounts. If this isn't suitable, you can modify the paths by using either a relative or absolute path. Additionally, do not mix the `apps` and `custom_apps` folders. These folders contain different sets of apps, and mixing them will result in a broken installation. While upgrades\recovery may sometimes still be possible, this configuration is likely to cause issues. +The examples above use the current directory for bind mounts. If this isn't suitable, you can modify the paths by using either a relative or absolute path. + +NOTE: Do not confuse the `apps` and `custom_apps` folders. These folders contain different sets of apps, and mixing them will result in a broken installation. The former contains "shipped" apps, which come with Nextcloud Server. The latter contains apps you install from the App Store. ### Custom volumes From 090934d9b0e1eec99479f84ab0e0b0bf8ff74857 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 22 Oct 2024 09:15:05 -0400 Subject: [PATCH 106/123] feat(readme): Viewing merged config via `occ config:list system` Signed-off-by: Josh --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d8f41dcb..ab6608ad 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,8 @@ If mounting additional volumes under `/var/www/html`, you should consider: You should note that data inside the main folder (`/var/www/html`) will be overridden/removed during installation and upgrades, unless listed in [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude). The additional volumes officially supported are already in that list, but custom volumes will need to be added by you. We suggest mounting custom storage volumes outside of `/var/www/html` and if possible read-only so that making this adjustment is unnecessary. If you must do so, however, you may build a custom image with a modified `/upgrade.exclude` file that incorporates your custom volume(s). -## Using the Nextcloud command-line interface +## Using the Nextcloud command-line interface (`occ`) + To use the [Nextcloud command-line interface](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html) (aka. `occ` command): ```console $ docker exec --user www-data CONTAINER_ID php occ @@ -112,6 +113,23 @@ or for docker compose: ```console $ docker compose exec --user www-data app php occ ``` +or even shorter: +```console +$ docker compose exec -u33 app ./occ +``` +Note: substitute `82` for `33` if using the Alpine-based images. + +## Viewing the Nextcloud configuration (`config.php`) + +The image takes advantage of Nextcloud's [Multiple config.php support](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#multiple-config-php-file) to inject auto configuration environment variables and set image specific config values. + +This means that merely viewing your `config.php` will not give you an accurate view of your running config. Instead, you should use Nextcloud's [`occ config:list system` command](https://docs.nextcloud.com/server/latest/admin_manual/occ_command.html#config-commands-label) to get get a complete view of your merged configuration. This has the added benefit of automatically omitting sensitive values such as passwords and secrets from the output by default (e.g. useful for shared publicly or assisting others when troubleshooting or reporting a bug). + +```console +$ docker compose exec -u33 app ./occ config:list system +``` + +The `--private` flag can also be specified, in order to output all configuration values including passwords and secrets. ## Auto configuration via environment variables The Nextcloud image supports auto configuration via environment variables. You can preconfigure everything that is asked on the install page on first run. To enable auto configuration, set your database connection via the following environment variables. You must specify all of the environment variables for a given database or the database environment variables defaults to SQLITE. ONLY use one database type! From d3341b61c1d41ac7fa98a34b8a3c6bc14c534efe Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Thu, 24 Oct 2024 21:52:36 +0200 Subject: [PATCH 107/123] Fix initialization of `autocreate` and `use_ssl` (#2309) According to the documentation, both `OBJECTSTORE_S3_SSL` and `OBJECTSTORE_S3_AUTOCREATE` should default to `true`. Currently, when these environment variables are not set, they default to `false`. (See https://github.com/nextcloud/docker/issues/2308). This fix works, because `strtolower(false)` returns the empty string. So when `OBJECTSTORE_S3_SSL` is not set and `getenv('OBJECTSTORE_S3_SSL')` returns `false`, the check `strtolower($use_ssl) !== 'false'` will evaluate to `true`. With this fix, both values will be `true` if they are * not set * the empty string * any string that is not equal to `false` when converted to lowercase This should now match the documented behavior. Signed-off-by: Valentin Brandl --- .config/s3.config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/s3.config.php b/.config/s3.config.php index 9941c562..a17e4037 100644 --- a/.config/s3.config.php +++ b/.config/s3.config.php @@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + 'autocreate' => strtolower($autocreate) !== 'false', + 'use_ssl' => strtolower($use_ssl) !== 'false', // required for some non Amazon S3 implementations 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', // required for older protocol versions From 29d959acfdeccbc3603a37cc4201b6ad916290bd Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Thu, 24 Oct 2024 19:52:51 +0000 Subject: [PATCH 108/123] Runs update.sh --- 28/apache/config/s3.config.php | 4 ++-- 28/fpm-alpine/config/s3.config.php | 4 ++-- 28/fpm/config/s3.config.php | 4 ++-- 29/apache/config/s3.config.php | 4 ++-- 29/fpm-alpine/config/s3.config.php | 4 ++-- 29/fpm/config/s3.config.php | 4 ++-- 30/apache/config/s3.config.php | 4 ++-- 30/fpm-alpine/config/s3.config.php | 4 ++-- 30/fpm/config/s3.config.php | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/28/apache/config/s3.config.php b/28/apache/config/s3.config.php index 9941c562..a17e4037 100644 --- a/28/apache/config/s3.config.php +++ b/28/apache/config/s3.config.php @@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + 'autocreate' => strtolower($autocreate) !== 'false', + 'use_ssl' => strtolower($use_ssl) !== 'false', // required for some non Amazon S3 implementations 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', // required for older protocol versions diff --git a/28/fpm-alpine/config/s3.config.php b/28/fpm-alpine/config/s3.config.php index 9941c562..a17e4037 100644 --- a/28/fpm-alpine/config/s3.config.php +++ b/28/fpm-alpine/config/s3.config.php @@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + 'autocreate' => strtolower($autocreate) !== 'false', + 'use_ssl' => strtolower($use_ssl) !== 'false', // required for some non Amazon S3 implementations 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', // required for older protocol versions diff --git a/28/fpm/config/s3.config.php b/28/fpm/config/s3.config.php index 9941c562..a17e4037 100644 --- a/28/fpm/config/s3.config.php +++ b/28/fpm/config/s3.config.php @@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + 'autocreate' => strtolower($autocreate) !== 'false', + 'use_ssl' => strtolower($use_ssl) !== 'false', // required for some non Amazon S3 implementations 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', // required for older protocol versions diff --git a/29/apache/config/s3.config.php b/29/apache/config/s3.config.php index 9941c562..a17e4037 100644 --- a/29/apache/config/s3.config.php +++ b/29/apache/config/s3.config.php @@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + 'autocreate' => strtolower($autocreate) !== 'false', + 'use_ssl' => strtolower($use_ssl) !== 'false', // required for some non Amazon S3 implementations 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', // required for older protocol versions diff --git a/29/fpm-alpine/config/s3.config.php b/29/fpm-alpine/config/s3.config.php index 9941c562..a17e4037 100644 --- a/29/fpm-alpine/config/s3.config.php +++ b/29/fpm-alpine/config/s3.config.php @@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + 'autocreate' => strtolower($autocreate) !== 'false', + 'use_ssl' => strtolower($use_ssl) !== 'false', // required for some non Amazon S3 implementations 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', // required for older protocol versions diff --git a/29/fpm/config/s3.config.php b/29/fpm/config/s3.config.php index 9941c562..a17e4037 100644 --- a/29/fpm/config/s3.config.php +++ b/29/fpm/config/s3.config.php @@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + 'autocreate' => strtolower($autocreate) !== 'false', + 'use_ssl' => strtolower($use_ssl) !== 'false', // required for some non Amazon S3 implementations 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', // required for older protocol versions diff --git a/30/apache/config/s3.config.php b/30/apache/config/s3.config.php index 9941c562..a17e4037 100644 --- a/30/apache/config/s3.config.php +++ b/30/apache/config/s3.config.php @@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + 'autocreate' => strtolower($autocreate) !== 'false', + 'use_ssl' => strtolower($use_ssl) !== 'false', // required for some non Amazon S3 implementations 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', // required for older protocol versions diff --git a/30/fpm-alpine/config/s3.config.php b/30/fpm-alpine/config/s3.config.php index 9941c562..a17e4037 100644 --- a/30/fpm-alpine/config/s3.config.php +++ b/30/fpm-alpine/config/s3.config.php @@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + 'autocreate' => strtolower($autocreate) !== 'false', + 'use_ssl' => strtolower($use_ssl) !== 'false', // required for some non Amazon S3 implementations 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', // required for older protocol versions diff --git a/30/fpm/config/s3.config.php b/30/fpm/config/s3.config.php index 9941c562..a17e4037 100644 --- a/30/fpm/config/s3.config.php +++ b/30/fpm/config/s3.config.php @@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + 'autocreate' => strtolower($autocreate) !== 'false', + 'use_ssl' => strtolower($use_ssl) !== 'false', // required for some non Amazon S3 implementations 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', // required for older protocol versions From 4f130dc7527e9f405349767596b168c81b45ba24 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Thu, 7 Nov 2024 23:24:17 +0000 Subject: [PATCH 109/123] Runs update.sh --- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/fpm/Dockerfile | 6 +++--- 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 | 18 +++++++++--------- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile index d63fb3a8..00bfaa72 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.11 +ENV NEXTCLOUD_VERSION 28.0.12 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-28.0.11.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index a7352299..18af3386 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.11 +ENV NEXTCLOUD_VERSION 28.0.12 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index ae69769d..40598ea8 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.11 +ENV NEXTCLOUD_VERSION 28.0.12 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-28.0.11.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.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/apache/Dockerfile b/29/apache/Dockerfile index 8e9316c9..58132fb2 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 29.0.8 +ENV NEXTCLOUD_VERSION 29.0.9 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.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 5344aed5..de280bc7 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.8 +ENV NEXTCLOUD_VERSION 29.0.9 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.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 a69317bb..c0ebab1a 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.8 +ENV NEXTCLOUD_VERSION 29.0.9 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.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 b01d9611..0e0fd6aa 100644 --- a/30/apache/Dockerfile +++ b/30/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 30.0.1 +ENV NEXTCLOUD_VERSION 30.0.2 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.1.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.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 a6197cc8..79783a65 100644 --- a/30/fpm-alpine/Dockerfile +++ b/30/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 30.0.1 +ENV NEXTCLOUD_VERSION 30.0.2 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.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 9ab2e055..4258ff9d 100644 --- a/30/fpm/Dockerfile +++ b/30/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 30.0.1 +ENV NEXTCLOUD_VERSION 30.0.2 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.1.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.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 1c8398ee..4f3a0694 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -30.0.1 +30.0.2 diff --git a/versions.json b/versions.json index db86e255..e719e79f 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "30": { "branch": "30", - "version": "30.0.1", - "url": "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-30.0.1.tar.bz2.asc", + "version": "30.0.2", + "url": "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -27,9 +27,9 @@ }, "29": { "branch": "29", - "version": "29.0.8", - "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2.asc", + "version": "29.0.9", + "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -53,9 +53,9 @@ }, "28": { "branch": "28", - "version": "28.0.11", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.11.tar.bz2.asc", + "version": "28.0.12", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From b9ed2426a0a2c7feb954c9b722d1390cc8fbd26b Mon Sep 17 00:00:00 2001 From: J0WI Date: Thu, 7 Nov 2024 23:27:03 +0000 Subject: [PATCH 110/123] Bump stable to 30.0.2 Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 43c9aab0..7a1332ef 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='30.0.1' +stable_channel='30.0.2' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From dd663d60c69954c0b50b68c4d870f9910ddbfab9 Mon Sep 17 00:00:00 2001 From: rugk Date: Fri, 8 Nov 2024 00:38:16 +0100 Subject: [PATCH 111/123] Add example command for copying (#2327) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As for https://github.com/nextcloud/docker/issues/2266 and the re-appearing message IMHO, it is quite convenient to have a command to copy here if you just have not changed any config files… Signed-off-by: rugk --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ab6608ad..8933161e 100644 --- a/README.md +++ b/README.md @@ -242,6 +242,10 @@ During a fresh Nextcloud installation, the latest version (from the image) of th The copied files, however, are **not** automatically overwritten whenever you update your environment with a newer Nextcloud image. This is to prevent local changes in `/var/www/html/config` from being unexpectedly overwritten. This may lead to your image-specific configuration files becoming outdated and image functionality not matching that which is documented. A warning will be generated in the container log output when outdated image-specific configuration files are detected at startup in a running container. When you see this warning, you should manually compare (or copy) the files from `/usr/src/nextcloud/config` to `/var/www/html/config`. +A command to copy these configs would e.g. be: +```console +docker exec sh -c "cp /usr/src/nextcloud/config/*.php /var/www/html/config" +``` As long as you have not modified any of the provided config files in `/var/www/html/config` (other than `config.php`) or only added new ones with names that do not conflict with the image specific ones, copying the new ones into place should be safe (but check the source path `/usr/src/nextcloud/config` for any newly named config files to avoid new overlaps just in case). From daea70d768f055118aff61f3aeaea3b43242b06d Mon Sep 17 00:00:00 2001 From: Kaloyan Nikolov Date: Tue, 12 Nov 2024 23:25:14 +0200 Subject: [PATCH 112/123] Replace bind mounts with figurative path Signed-off-by: Kaloyan Nikolov --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index bbe7ee7b..60762b62 100644 --- a/README.md +++ b/README.md @@ -97,25 +97,25 @@ nextcloud If you'd prefer to use bind mounts instead of named volumes, for instance, when working with different device or network mounts for user data files and configuration: ```console $ docker run -d \ --v $(pwd)/nextcloud:/var/www/html \ --v $(pwd)/custom_apps:/var/www/html/custom_apps \ --v $(pwd)/config:/var/www/html/config \ --v $(pwd)/data:/var/www/html/data \ --v $(pwd)/theme:/var/www/html/themes/ \ +-v /path/on/host/to/folder/nextcloud:/var/www/html \ +-v /path/on/host/to/folder/custom_apps:/var/www/html/custom_apps \ +-v /path/on/host/to/folder/config:/var/www/html/config \ +-v /path/on/host/to/folder/data:/var/www/html/data \ +-v /path/on/host/to/folder/theme:/var/www/html/themes/ \ nextcloud ``` Here’s the same example using Docker's more detailed `--mount`. Note that with `-v` or `--volume`, the specified folders are created automatically if they don't exist. However, when using `--mount` for bind mounts, the directories must already exist on the host, or Docker will return an error. ```console $ docker run -d \ ---mount type=bind,source=$(pwd)/nextcloud,target=/var/www/html \ ---mount type=bind,source=$(pwd)/custom_apps,target=/var/www/html/custom_apps \ ---mount type=bind,source=$(pwd)/config,target=/var/www/html/config \ ---mount type=bind,source=$(pwd)/data,target=/var/www/html/data \ ---mount type=bind,source=$(pwd)/theme,target=/var/www/html/themes/ \ +--mount type=bind,source=/path/on/host/to/folder/nextcloud,target=/var/www/html \ +--mount type=bind,source=/path/on/host/to/folder/custom_apps,target=/var/www/html/custom_apps \ +--mount type=bind,source=/path/on/host/to/folder/config,target=/var/www/html/config \ +--mount type=bind,source=/path/on/host/to/folder/data,target=/var/www/html/data \ +--mount type=bind,source=/path/on/host/to/folder/theme,target=/var/www/html/themes/ \ nextcloud ``` -The examples above use the current directory for bind mounts. If this isn't suitable, you can modify the paths by using either a relative or absolute path. +The examples above use figurative directory `/path/on/host/to/folder/` for bind mounts. Please modify the paths by using either a relative or absolute path. NOTE: Do not confuse the `apps` and `custom_apps` folders. These folders contain different sets of apps, and mixing them will result in a broken installation. The former contains "shipped" apps, which come with Nextcloud Server. The latter contains apps you install from the App Store. From 3d21293d9e03a1660a623597b12eb2f473638af0 Mon Sep 17 00:00:00 2001 From: Josh Date: Sun, 24 Nov 2024 13:48:05 -0500 Subject: [PATCH 113/123] docs(readme): Add more headers for direct linking / misc refactors Signed-off-by: Josh --- README.md | 152 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 106 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 8933161e..5d16c87d 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,18 @@ The second option is a `fpm` container. It is based on the [php-fpm](https://hub [![Try in PWD](https://github.com/play-with-docker/stacks/raw/cff22438cb4195ace27f9b15784bbb497047afa7/assets/images/button.png)](http://play-with-docker.com?stack=https://raw.githubusercontent.com/nextcloud/docker/8db861d67f257a3e9ac1790ea06d4e2a7a193a6c/stack.yml) +## Getting help + +Most Nextcloud Server administrative matters are covered in the official [Nextcloud Admin Manual](https://docs.nextcloud.com/server/latest/admin_manual/) or [other official Nextcloud documentation](https://docs.nextcloud.com) (which are all routinely updated). + +**If you have any problems or usage questions while using the image, please ask for assistance on the [Nextcloud Community Help Forum](https://help.nextcloud.com)** rather than reporting them as "bugs" (unless they are bugs of course). This helps the +maintainers (who are volunteers) remain focused on making the image better (rather than responding solely to one-on-one support issues). (Tip: Some of the maintainers are also regular responders to help requests +on the [community help forum](https://help.nextcloud.com/).) + +For the image specifically, we provide [some simple deployment examples](https://github.com/nextcloud/docker/?tab=readme-ov-file#running-this-image-with-docker-compose) as well as some more extensive [deployment examples](https://github.com/nextcloud/docker/tree/master/.examples). In addition, the [community help forum](https://help.nextcloud.com/) has a "how-to" section with further examples of other peoples' containerbased Nextcloud stacks. + +Below you'll find the main documentation for using this image. + ## Using the apache image The apache image contains a webserver and exposes port 80. To start the container type: @@ -36,6 +48,8 @@ $ docker run -d -p 8080:80 nextcloud Now you can access Nextcloud at http://localhost:8080/ from your host system. +WARNING: This example is only suitable for limited testing purposes. Please read on to understand how the the image handles storing your data and other aspects you need to establish a full production Nextcloud stack. + ## Using the fpm image To use the fpm image, you need an additional web server, such as [nginx](https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html), that can proxy http-request to the fpm-port of the container. For fpm connection this container exposes port 9000. In most cases, you might want to use another container or your host as proxy. If you use your host you can address your Nextcloud container directly on port 9000. If you use another container, make sure that you add them to the same docker network (via `docker run --network ...` or a `docker compose` file). In both cases you don't want to map the fpm port to your host. @@ -47,7 +61,7 @@ $ docker run -d nextcloud:fpm As the fastCGI-Process is not capable of serving static files (style sheets, images, ...), the webserver needs access to these files. This can be achieved with the `volumes-from` option. You can find more information in the [docker compose section](#running-this-image-with-docker-compose). ## Using an external database -By default, this container uses SQLite for data storage but the Nextcloud setup wizard (appears on first run) allows connecting to an existing MySQL/MariaDB or PostgreSQL database. You can also link a database container, e. g. `--link my-mysql:mysql`, and then use `mysql` as the database host on setup. More info is in the docker compose section. +By default, this container uses SQLite for data storage but the Nextcloud setup wizard (appears on first run) allows connecting to an existing MySQL/MariaDB or PostgreSQL database. You can also link a database container, e. g. `--link my-mysql:mysql`, and then use `mysql` as the database host on setup. More info is in [the docker compose section](https://github.com/nextcloud/docker/?tab=readme-ov-file#running-this-image-with-docker-compose). ## Persistent data The Nextcloud installation and all data beyond what lives in the database (file uploads, etc.) are stored in the [unnamed docker volume](https://docs.docker.com/engine/tutorials/dockervolumes/#adding-a-data-volume) volume `/var/www/html`. The docker daemon will store that data within the docker directory `/var/lib/docker/volumes/...`. That means your data is saved even if the container crashes, is stopped or deleted. @@ -132,7 +146,14 @@ $ docker compose exec -u33 app ./occ config:list system The `--private` flag can also be specified, in order to output all configuration values including passwords and secrets. ## Auto configuration via environment variables -The Nextcloud image supports auto configuration via environment variables. You can preconfigure everything that is asked on the install page on first run. To enable auto configuration, set your database connection via the following environment variables. You must specify all of the environment variables for a given database or the database environment variables defaults to SQLITE. ONLY use one database type! + +The Nextcloud image supports auto configuration of the Nextcloud Server installation via environment variables. You can preconfigure everything that is normally asked for during the Nextcloud Installation Wizard (as well as a few other things). + +### Database parameters + +To enable auto configuration, define your database connection via the following environment variables. If you set any group of values (i.e. all of `MYSQL_DATABASE`, `MYSQL_USER`, `MYSQL_PASSWORD`, `MYSQL_HOST`), they will not be requested via the Installation Wizard on first run. + +You must specify all of the environment variables for a given database or the database environment variables defaults to SQLITE. ONLY use one database type! __SQLite__: - `SQLITE_DATABASE` Name of the database using sqlite @@ -149,21 +170,33 @@ __PostgreSQL__: - `POSTGRES_PASSWORD` Password for the database user using postgres. - `POSTGRES_HOST` Hostname of the database server using postgres. -As an alternative to passing sensitive information via environment variables, `_FILE` may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. See [Docker secrets](#docker-secrets) section below. +As an alternative to passing sensitive information via environment variables, `_FILE` may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. See [Docker secrets](#docker-secrets) section below for details. -If you set any group of values (i.e. all of `MYSQL_DATABASE`, `MYSQL_USER`, `MYSQL_PASSWORD`, `MYSQL_HOST`), they will not be asked in the install page on first run. With a complete configuration by using all variables for your database type, you can additionally configure your Nextcloud instance by setting admin user and password (only works if you set both): +### Initial admin account + +If you specify all the variables for your database type (above), you can also auto configure your initial admin user and password (only works if you set both): - `NEXTCLOUD_ADMIN_USER` Name of the Nextcloud admin user. - `NEXTCLOUD_ADMIN_PASSWORD` Password for the Nextcloud admin user. -If you want, you can set the data directory, otherwise default value will be used. +Specifying a complete database and admin credential config set at initial deployment will result in a fully automated installation (i.e. bypassing the web-based Nextcloud Installation Wizard). + +Addition parameters may also be set at installation time and are described below. + +### Custom Data directory (`datadirectory`) + +If you don't want to use the default data directory (`datadirectory`) location, you can set a custom one: - `NEXTCLOUD_DATA_DIR` (default: `/var/www/html/data`) Configures the data directory where nextcloud stores all files from the users. +### Trusted domains (`trusted_domains`) + One or more trusted domains can be set through environment variable, too. They will be added to the configuration after install. - `NEXTCLOUD_TRUSTED_DOMAINS` (not set by default) Optional space-separated list of domains +### Image specific + The install and update script is only triggered when a default command is used (`apache-foreground` or `php-fpm`). If you use a custom command you have to enable the install / update with - `NEXTCLOUD_UPDATE` (default: `0`) @@ -172,13 +205,17 @@ You might want to make sure the htaccess is up to date after each container upda - `NEXTCLOUD_INIT_HTACCESS` (not set by default) Set it to true to enable run `occ maintenance:update:htaccess` after container initialization. -If you want to use Redis you have to create a separate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your docker compose file. To inform Nextcloud about the Redis container, pass in the following parameters: +### Redis Memory Caching + +To use Redis for memory caching as well as PHP session, specify the following values and also add a [Redis](https://hub.docker.com/_/redis/) container to your stack. See the [examples](https://github.com/nextcloud/docker/tree/master/.examples) for further instructions. - `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 -The use of Redis is recommended to prevent file locking problems. See the examples for further instructions. +Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html) for more information. + +### E-mail (SMTP) Configuration To use an external SMTP server, you have to provide the connection details. Note that if you configure these values via Docker, you should **not** use the Nexcloud Web UI to configure external SMTP server parameters. Conversely, if you prefer to use the Web UI, do **not** set these variables here (because these variables will override whatever you attempt to set in the Web UI for these parameters). To configure Nextcloud to use SMTP add: @@ -191,10 +228,16 @@ To use an external SMTP server, you have to provide the connection details. Note - `MAIL_FROM_ADDRESS` (not set by default): Set the local-part for the 'from' field in the emails sent by Nextcloud. - `MAIL_DOMAIN` (not set by default): Set a different domain for the emails than the domain where Nextcloud is installed. -At least `SMTP_HOST`, `MAIL_FROM_ADDRESS` and `MAIL_DOMAIN` must be set for the configurations to be applied. +At a minimum, the `SMTP_HOST`, `MAIL_FROM_ADDRESS` and `MAIL_DOMAIN` parameters must be defined. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/email_configuration.html) for other values to configure SMTP. +### Object Storage (Primary Storage) + +By default, Nextcloud stores all files `/var/www/html/data/` (or whatever custom data directory you've configured). Nextcloud also allows the use of object storages (like OpenStack +Swift or any compatible Amazon S3-implementation) as *Primary Storage*. This semi-replaces the default storage of files in the data directory. Note: This data directory might still be +used for compatibility reasons. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html) for more information. + To use an external S3 compatible object store as primary storage, set the following variables: - `OBJECTSTORE_S3_BUCKET`: The name of the bucket that Nextcloud should store the data in - `OBJECTSTORE_S3_REGION`: The region that the S3 bucket resides in @@ -226,21 +269,51 @@ To use an external OpenStack Swift object store as primary storage, set the foll Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html#openstack-swift) for more information. +### PHP Configuration + To customize other PHP limits you can simply change the following variables: - `PHP_MEMORY_LIMIT` (default `512M`) This sets the maximum amount of memory in bytes that a script is allowed to allocate. This is meant to help prevent poorly written scripts from eating up all available memory but it can prevent normal operation if set too tight. - `PHP_UPLOAD_LIMIT` (default `512M`) This sets the upload limit (`post_max_size` and `upload_max_filesize`) for big files. Note that you may have to change other limits depending on your client, webserver or operating system. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html) for more information. -To customize Apache max file upload limit you can change the following variable: +### Apache Configuration + +To customize the Apache max file upload limit you can change the following variable: - `APACHE_BODY_LIMIT` (default `1073741824` [1GiB]) This restricts the total size of the HTTP request body sent from the client. It specifies the number of _bytes_ that are allowed in a request body. A value of **0** means **unlimited**. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html#apache) for more information. -### Auto configuration and Nextcloud updates -The image comes with special config files for Nextcloud that set parameters specific to containerized usage (e.g. `upgrade-disable-web.config.php`) or enable auto configuration via environment variables (e.g. `reverse-proxy.config.php`). Within the image, the latest version of these config files are located in `/usr/src/nextcloud/config`. +Note: Only applicable to the `apache` image variants. -During a fresh Nextcloud installation, the latest version (from the image) of these files are copied into `/var/www/html/config` so that they are stored within your container's persistent volume and picked up by Nextcloud alongside your local configuration. +### Using the image behind a reverse proxy and specifying the server host and protocol + +The apache image will replace the remote addr (IP address visible to Nextcloud) with the IP address from `X-Real-IP` if the request is coming from a proxy in `10.0.0.0/8`, `172.16.0.0/12` or `192.168.0.0/16` by default. If you want Nextcloud to pick up the server host (`HTTP_X_FORWARDED_HOST`), protocol (`HTTP_X_FORWARDED_PROTO`) and client IP (`HTTP_X_FORWARDED_FOR`) from a trusted proxy, then disable rewrite IP and add the reverse proxy's IP address to `TRUSTED_PROXIES`. + +- `APACHE_DISABLE_REWRITE_IP` (not set by default): Set to 1 to disable rewrite IP. + +- `TRUSTED_PROXIES` (empty by default): A space-separated list of trusted proxies. CIDR notation is supported for IPv4. + +If the `TRUSTED_PROXIES` approach does not work for you, try using fixed values for overwrite parameters. + +- `OVERWRITEHOST` (empty by default): Set the hostname of the proxy. Can also specify a port. +- `OVERWRITEPROTOCOL` (empty by default): Set the protocol of the proxy, http or https. +- `OVERWRITECLIURL` (empty by default): Set the cli url of the proxy (e.g. https://mydnsname.example.com) +- `OVERWRITEWEBROOT` (empty by default): Set the absolute path of the proxy. +- `OVERWRITECONDADDR` (empty by default): Regex to overwrite the values dependent on the remote address. +- `FORWARDED_FOR_HEADERS` (empty by default): HTTP headers with the original client IP address + +Check the [Nexcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html) for more details. + +Keep in mind that once set at install time, removing these environment variables later won't remove them from your `config/config.php`, due to how Nextcloud generates and merges the initial configuration at installation time. They can still, however, be removed manually from your `config/config.php`. + +### Handling `Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile` (aka: Auto configuration and Nextcloud updates) + +The image comes with special config files for Nextcloud that set parameters specific to containerized usage (e.g. `upgrade-disable-web.config.php`) or enable auto configuration via environment variables (e.g. `reverse-proxy.config.php`). Not keeping these files up-to-date when this warning appears may cause certain auto configuration environment variables to be ignored or the image to not work as documented or expected. + +During a fresh Nextcloud installation, the latest version (from the image) of these files are copied into `/var/www/html/config` so that they are stored within your container's persistent storage and picked up by Nextcloud alongside your local configuration. The copied files, however, are **not** automatically overwritten whenever you update your environment with a newer Nextcloud image. This is to prevent local changes in `/var/www/html/config` from being unexpectedly overwritten. This may lead to your image-specific configuration files becoming outdated and image functionality not matching that which is documented. +Within each image, the latest version of these config files are located in `/usr/src/nextcloud/config`. + A warning will be generated in the container log output when outdated image-specific configuration files are detected at startup in a running container. When you see this warning, you should manually compare (or copy) the files from `/usr/src/nextcloud/config` to `/var/www/html/config`. A command to copy these configs would e.g. be: ```console @@ -249,8 +322,6 @@ docker exec sh -c "cp /usr/src/nextcloud/config/*.php /var/www/ As long as you have not modified any of the provided config files in `/var/www/html/config` (other than `config.php`) or only added new ones with names that do not conflict with the image specific ones, copying the new ones into place should be safe (but check the source path `/usr/src/nextcloud/config` for any newly named config files to avoid new overlaps just in case). -Not keeping these files up-to-date when this warning appears may cause certain auto configuration environment variables to be ignored or the image to not work as documented or expected. - ## Auto configuration via hook folders There are 5 hooks @@ -282,28 +353,6 @@ To use the hooks triggered by the `entrypoint` script, either ... ``` - -## Using the image behind a reverse proxy and auto configure server host and protocol - -The apache image will replace the remote addr (IP address visible to Nextcloud) with the IP address from `X-Real-IP` if the request is coming from a proxy in `10.0.0.0/8`, `172.16.0.0/12` or `192.168.0.0/16` by default. If you want Nextcloud to pick up the server host (`HTTP_X_FORWARDED_HOST`), protocol (`HTTP_X_FORWARDED_PROTO`) and client IP (`HTTP_X_FORWARDED_FOR`) from a trusted proxy, then disable rewrite IP and add the reverse proxy's IP address to `TRUSTED_PROXIES`. - -- `APACHE_DISABLE_REWRITE_IP` (not set by default): Set to 1 to disable rewrite IP. - -- `TRUSTED_PROXIES` (empty by default): A space-separated list of trusted proxies. CIDR notation is supported for IPv4. - -If the `TRUSTED_PROXIES` approach does not work for you, try using fixed values for overwrite parameters. - -- `OVERWRITEHOST` (empty by default): Set the hostname of the proxy. Can also specify a port. -- `OVERWRITEPROTOCOL` (empty by default): Set the protocol of the proxy, http or https. -- `OVERWRITECLIURL` (empty by default): Set the cli url of the proxy (e.g. https://mydnsname.example.com) -- `OVERWRITEWEBROOT` (empty by default): Set the absolute path of the proxy. -- `OVERWRITECONDADDR` (empty by default): Regex to overwrite the values dependent on the remote address. -- `FORWARDED_FOR_HEADERS` (empty by default): HTTP headers with the original client IP address - -Check the [Nexcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html) for more details. - -Keep in mind that once set, removing these environment variables won't remove these values from the configuration file, due to how Nextcloud merges configuration files together. - # Running this image with docker compose The easiest way to get a fully featured and functional setup is using a `compose.yaml` file. There are too many different possibilities to setup your system, so here are only some examples of what you have to look for. @@ -414,7 +463,17 @@ volumes: Then run `docker compose up -d`, now you can access Nextcloud at http://localhost:8080/ from your host system. # Docker Secrets -As an alternative to passing sensitive information via environment variables, `_FILE` may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in `/run/secrets/` files. For example: + +As an alternative to passing sensitive information via environment variables, `_FILE` may be appended to some the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in `/run/secrets/` files. + +Currently, this is only supported for `NEXTCLOUD_ADMIN_PASSWORD`, `NEXTCLOUD_ADMIN_USER`, `MYSQL_DATABASE`, `MYSQL_PASSWORD`, `MYSQL_USER`, `POSTGRES_DB`, `POSTGRES_PASSWORD`, `POSTGRES_USER`, `REDIS_HOST_PASSWORD`, `SMTP_PASSWORD`, `OBJECTSTORE_S3_KEY`, and `OBJECTSTORE_S3_SECRET`. + +If you set any group of `_FILE` based values (i.e. all of `MYSQL_DATABASE_FILE`, `MYSQL_USER_FILE`, `MYSQL_PASSWORD_FILE`), their non-`_FILE` counterparts will be ignored (`MYSQL_DATABASE`, `MYSQL_USER`, `MYSQL_PASSWORD`). + +Any files containing secrets must be readable by the UID the container is running Nextcloud as (i.e. `www-data` / `33`). + +Example: + ```yaml services: db: @@ -475,10 +534,6 @@ secrets: file: ./postgres_user.txt # put postgresql username in this file ``` -Currently, this is only supported for `NEXTCLOUD_ADMIN_PASSWORD`, `NEXTCLOUD_ADMIN_USER`, `MYSQL_DATABASE`, `MYSQL_PASSWORD`, `MYSQL_USER`, `POSTGRES_DB`, `POSTGRES_PASSWORD`, `POSTGRES_USER`, `REDIS_HOST_PASSWORD`, `SMTP_PASSWORD`, `OBJECTSTORE_S3_KEY`, and `OBJECTSTORE_S3_SECRET`. - -If you set any group of values (i.e. all of `MYSQL_DATABASE_FILE`, `MYSQL_USER_FILE`, `MYSQL_PASSWORD_FILE`, `MYSQL_HOST`), the script will not use the corresponding group of environment variables (`MYSQL_DATABASE`, `MYSQL_USER`, `MYSQL_PASSWORD`, `MYSQL_HOST`). - # Make your Nextcloud available from the internet Until here, your Nextcloud is just available from your docker host. If you want your Nextcloud available from the internet adding SSL encryption is mandatory. @@ -653,12 +708,17 @@ docker exec container-name chown -R www-data:root /var/www/html ``` After changing the permissions, restart the container and the permission errors should disappear. -# Help (Questions / Issues) -**If you have any questions or problems while using the image, please ask for assistance on the Help Forum first (https://help.nextcloud.com)**. +# Reporting bugs or suggesting enhancements -Also, most Nextcloud Server matters are covered in the [Nextcloud Admin Manual](https://docs.nextcloud.com/server/latest/admin_manual/) which is routinely updated. +If you believe you've found a bug in the image itself (or have an enhancement idea specific to the image), please [search for already reported bugs and enhancement ideas](https://github.com/nextcloud/docker/issues). -If you believe you've found a bug (or have an enhancement idea) in the image itself, please [search for already reported bugs and enhancement ideas](https://github.com/nextcloud/docker/issues). If there is an existing open issue, you can either add to the discussion there or upvote to indicate you're impacted by (or interested in) the same issue. If you believe you've found a new bug, please create a new Issue so that others can try to reproduce it and remediation can be tracked. +If there is a relevant existing open issue, you can either add to the discussion there or upvote it to indicate you're impacted by (or interested in) the same issue. -Thanks for helping to make the Nextcloud community maintained micro-services image better! +If you believe you've found a new bug, please create a new Issue so that others can try to reproduce it and remediation can be tracked. + +**If you have any problems or usage questions while using the image, please ask for assistance on the [Nextcloud Community Help Forum](https://help.nextcloud.com)** rather than reporting them as "bugs" (unless they really are bugs of course). This helps the +maintainers (who are volunteers) remain focused on making the image better (rather than responding solely to one-on-one support issues). (Tip: Some of the maintainers are also regular responders to help requests +on the [Nextcloud Community Help Forum](https://help.nextcloud.com).) + +Most Nextcloud Server matters are covered in the official [Nextcloud Admin Manual](https://docs.nextcloud.com/server/latest/admin_manual/) or the [other official Nextcloud documentation](https://docs.nextcloud.com) (which are routinely updated). From 61fb34da5f1b0f3a3f2356df6c328323cbd8098d Mon Sep 17 00:00:00 2001 From: Josh Date: Sun, 24 Nov 2024 21:40:34 -0500 Subject: [PATCH 114/123] fix(readme): a few typos and small sentences adjustments Signed-off-by: Josh --- README.md | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 75c8a9e6..f2def1aa 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Most Nextcloud Server administrative matters are covered in the official [Nextcl maintainers (who are volunteers) remain focused on making the image better (rather than responding solely to one-on-one support issues). (Tip: Some of the maintainers are also regular responders to help requests on the [community help forum](https://help.nextcloud.com/).) -For the image specifically, we provide [some simple deployment examples](https://github.com/nextcloud/docker/?tab=readme-ov-file#running-this-image-with-docker-compose) as well as some more extensive [deployment examples](https://github.com/nextcloud/docker/tree/master/.examples). In addition, the [community help forum](https://help.nextcloud.com/) has a "how-to" section with further examples of other peoples' containerbased Nextcloud stacks. +For the image specifically, we provide [some simple deployment examples](https://github.com/nextcloud/docker/?tab=readme-ov-file#running-this-image-with-docker-compose) as well as some more extensive [deployment examples](https://github.com/nextcloud/docker/tree/master/.examples). In addition, the [community help forum](https://help.nextcloud.com/) has a "how-to" section with further examples of other peoples' container based Nextcloud stacks. Below you'll find the main documentation for using this image. @@ -48,7 +48,7 @@ $ docker run -d -p 8080:80 nextcloud Now you can access Nextcloud at http://localhost:8080/ from your host system. -WARNING: This example is only suitable for limited testing purposes. Please read on to understand how the the image handles storing your data and other aspects you need to establish a full production Nextcloud stack. +WARNING: This example is only suitable for limited testing purposes. Please read on to understand how the image handles storing your data and other aspects you need to consider to establish a full Nextcloud stack. ## Using the fpm image @@ -139,10 +139,10 @@ If mounting additional volumes under `/var/www/html`, you should consider: - Confirming that [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude) contains the files and folders that should persist during installation and upgrades; or - Mounting storage volumes to locations outside of `/var/www/html`. -You should note that data inside the main folder (`/var/www/html`) will be overridden/removed during installation and upgrades, unless listed in [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude). The additional volumes officially supported are already in that list, but custom volumes will need to be added by you. We suggest mounting custom storage volumes outside of `/var/www/html` and if possible read-only so that making this adjustment is unnecessary. If you must do so, however, you may build a custom image with a modified `/upgrade.exclude` file that incorporates your custom volume(s). +**Data inside the main folder (`/var/www/html`) will be overridden/removed during installation and upgrades, unless listed in [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude).** The additional volumes officially supported are already in that list, but custom volumes will need to be added by you. We suggest mounting custom storage volumes outside of `/var/www/html` and if possible read-only so that making this adjustment is unnecessary. If you must do so, however, you may build a custom image with a modified `/upgrade.exclude` file that incorporates your custom volume(s). -## Using the Nextcloud command-line interface (`occ`) +## Accessing the Nextcloud command-line interface (`occ`) To use the [Nextcloud command-line interface](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html) (aka. `occ` command): ```console @@ -172,7 +172,7 @@ The `--private` flag can also be specified, in order to output all configuration ## Auto configuration via environment variables -The Nextcloud image supports auto configuration of the Nextcloud Server installation via environment variables. You can preconfigure everything that is normally asked for during the Nextcloud Installation Wizard (as well as a few other things). +The Nextcloud image supports auto configuration of the Nextcloud Server installation via environment variables. You can preconfigure everything that would otherwise be prompted for by the Nextcloud Installation Wizard (as well as a few other key parameters relevant to initial installation). ### Database parameters @@ -232,7 +232,7 @@ You might want to make sure the htaccess is up to date after each container upda ### Redis Memory Caching -To use Redis for memory caching as well as PHP session, specify the following values and also add a [Redis](https://hub.docker.com/_/redis/) container to your stack. See the [examples](https://github.com/nextcloud/docker/tree/master/.examples) for further instructions. +To use Redis for memory caching as well as PHP session storage, specify the following values and also add a [Redis](https://hub.docker.com/_/redis/) container to your stack. See the [examples](https://github.com/nextcloud/docker/tree/master/.examples) for further instructions. - `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. @@ -259,9 +259,9 @@ Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/adm ### Object Storage (Primary Storage) -By default, Nextcloud stores all files `/var/www/html/data/` (or whatever custom data directory you've configured). Nextcloud also allows the use of object storages (like OpenStack -Swift or any compatible Amazon S3-implementation) as *Primary Storage*. This semi-replaces the default storage of files in the data directory. Note: This data directory might still be -used for compatibility reasons. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html) for more information. +By default, Nextcloud stores all files in `/var/www/html/data/` (or whatever custom data directory you've configured). Nextcloud also allows the use of object storages (like OpenStack +Swift or any Amazon S3-compatible implementation) as *Primary Storage*. This semi-replaces the default storage of files in the data directory. Note: This data directory might still be +used for compatibility reasons and still needs to exist. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html) for more information. To use an external S3 compatible object store as primary storage, set the following variables: - `OBJECTSTORE_S3_BUCKET`: The name of the bucket that Nextcloud should store the data in @@ -296,7 +296,7 @@ Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/adm ### PHP Configuration -To customize other PHP limits you can simply change the following variables: +To customize PHP limits you can change the following variables: - `PHP_MEMORY_LIMIT` (default `512M`) This sets the maximum amount of memory in bytes that a script is allowed to allocate. This is meant to help prevent poorly written scripts from eating up all available memory but it can prevent normal operation if set too tight. - `PHP_UPLOAD_LIMIT` (default `512M`) This sets the upload limit (`post_max_size` and `upload_max_filesize`) for big files. Note that you may have to change other limits depending on your client, webserver or operating system. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html) for more information. @@ -304,13 +304,13 @@ To customize other PHP limits you can simply change the following variables: To customize the Apache max file upload limit you can change the following variable: - `APACHE_BODY_LIMIT` (default `1073741824` [1GiB]) This restricts the total -size of the HTTP request body sent from the client. It specifies the number of _bytes_ that are allowed in a request body. A value of **0** means **unlimited**. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html#apache) for more information. +size of the HTTP request body sent from the client. It specifies the number of _bytes_ that are allowed in a request body. A value of **0** means **unlimited**. -Note: Only applicable to the `apache` image variants. +Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html#apache) for more information. ### Using the image behind a reverse proxy and specifying the server host and protocol -The apache image will replace the remote addr (IP address visible to Nextcloud) with the IP address from `X-Real-IP` if the request is coming from a proxy in `10.0.0.0/8`, `172.16.0.0/12` or `192.168.0.0/16` by default. If you want Nextcloud to pick up the server host (`HTTP_X_FORWARDED_HOST`), protocol (`HTTP_X_FORWARDED_PROTO`) and client IP (`HTTP_X_FORWARDED_FOR`) from a trusted proxy, then disable rewrite IP and add the reverse proxy's IP address to `TRUSTED_PROXIES`. +By default, the apache image will replace the remote addr (IP address visible to Nextcloud) with the IP address from `X-Real-IP` if the request is coming from a reverse proxy in `10.0.0.0/8`, `172.16.0.0/12` or `192.168.0.0/16`. If you want Nextcloud to pick up the server host (`HTTP_X_FORWARDED_HOST`), protocol (`HTTP_X_FORWARDED_PROTO`) and client IP (`HTTP_X_FORWARDED_FOR`) from a trusted proxy, then disable rewrite IP and add the reverse proxy's IP address to `TRUSTED_PROXIES`. - `APACHE_DISABLE_REWRITE_IP` (not set by default): Set to 1 to disable rewrite IP. @@ -378,7 +378,7 @@ To use the hooks triggered by the `entrypoint` script, either ... ``` -# Running this image with docker compose +# Running this image with `docker compose` The easiest way to get a fully featured and functional setup is using a `compose.yaml` file. There are too many different possibilities to setup your system, so here are only some examples of what you have to look for. At first, make sure you have chosen the right base image (fpm or apache) and added features you wanted (see below). In every case, you would want to add a database container and docker volumes to get easy access to your persistent data. When you want to have your server reachable from the internet, adding HTTPS-encryption is mandatory! See below for more information. @@ -432,7 +432,7 @@ Then run `docker compose up -d`, now you can access Nextcloud at http://localhos ## Base version - FPM When using the FPM image, you need another container that acts as web server on port 80 and proxies the requests to the Nextcloud container. In this example a simple nginx container is combined with the Nextcloud-fpm image and a MariaDB database container. The data is stored in docker volumes. The nginx container also needs access to static files from your Nextcloud installation. It gets access to all the volumes mounted to Nextcloud via the `volumes` option. The configuration for nginx is stored in the configuration file `nginx.conf`, that is mounted into the container. An example can be found in the examples section [here](https://github.com/nextcloud/docker/tree/master/.examples). -This setup provides **no TLS encryption** and is intended to run behind a proxy. +This setup provides **no TLS encryption** and is intended to run behind a reverse proxy. Make sure to pass in values for `MYSQL_ROOT_PASSWORD` and `MYSQL_PASSWORD` variables before you run this setup. @@ -570,7 +570,9 @@ We recommend using a reverse proxy in front of your Nextcloud installation. Your In our [examples](https://github.com/nextcloud/docker/tree/master/.examples) section we have an example for a fully automated setup using a reverse proxy, a container for [Let's Encrypt](https://letsencrypt.org/) certificate handling, database and Nextcloud. It uses the popular [nginx-proxy](https://github.com/nginx-proxy/nginx-proxy) and [acme-companion](https://github.com/nginx-proxy/acme-companion) containers. Please check the according documentations before using this setup. # First use -When you first access your Nextcloud, the setup wizard will appear and ask you to choose an administrator account username, password and the database connection. For the database use `db` as host and `nextcloud` as table and user name. Also enter the password you chose in your `compose.yaml` file. +When you first access your Nextcloud, the setup wizard will appear and ask you to choose an administrator account username, password and the database connection (unless of course you've provided all the necessary auto-config config values ahead of time). + +For the database use `db` as host and `nextcloud` as table and user name. Also enter the password you chose in your `compose.yaml` file. # Update to a newer version Updating the Nextcloud container is done by pulling the new image, throwing away the old container and starting the new one. From d8b6fe8239304d792327fe86eed2f3216107854e Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Wed, 27 Nov 2024 00:34:53 +0000 Subject: [PATCH 115/123] Runs update.sh --- 29/apache/Dockerfile | 6 +++--- 29/fpm-alpine/Dockerfile | 6 +++--- 29/fpm/Dockerfile | 6 +++--- versions.json | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/29/apache/Dockerfile b/29/apache/Dockerfile index 58132fb2..8e9316c9 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 29.0.9 +ENV NEXTCLOUD_VERSION 29.0.8 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.9.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.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 de280bc7..5344aed5 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.9 +ENV NEXTCLOUD_VERSION 29.0.8 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.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 c0ebab1a..a69317bb 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.9 +ENV NEXTCLOUD_VERSION 29.0.8 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.9.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.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/versions.json b/versions.json index e719e79f..94f93c36 100644 --- a/versions.json +++ b/versions.json @@ -27,9 +27,9 @@ }, "29": { "branch": "29", - "version": "29.0.9", - "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.9.tar.bz2.asc", + "version": "29.0.8", + "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From cf1df9f1cc067edb8955ed42216686d4e80a4737 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 5 Dec 2024 15:29:24 -0500 Subject: [PATCH 116/123] chore: remove no longer used badges from README (#2345) Signed-off-by: Josh --- README.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/README.md b/README.md index f2def1aa..b3d5e7df 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,5 @@ # What is Nextcloud? -[![GitHub CI build status badge](https://github.com/nextcloud/docker/workflows/Images/badge.svg)](https://github.com/nextcloud/docker/actions?query=workflow%3AImages) -[![update.sh build status badge](https://github.com/nextcloud/docker/workflows/update.sh/badge.svg)](https://github.com/nextcloud/docker/actions?query=workflow%3Aupdate.sh) -[![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/nextcloud.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/nextcloud) -[![arm32v5 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/nextcloud.svg?label=arm32v5)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/nextcloud) -[![arm32v6 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/nextcloud.svg?label=arm32v6)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/nextcloud) -[![arm32v7 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/nextcloud.svg?label=arm32v7)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/nextcloud) -[![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/nextcloud.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/nextcloud) -[![i386 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/i386/job/nextcloud.svg?label=i386)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/nextcloud) -[![mips64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/mips64le/job/nextcloud.svg?label=mips64le)](https://doi-janky.infosiftr.net/job/multiarch/job/mips64le/job/nextcloud) -[![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/nextcloud.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/nextcloud) -[![s390x build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/s390x/job/nextcloud.svg?label=s390x)](https://doi-janky.infosiftr.net/job/multiarch/job/s390x/job/nextcloud) - A safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms. ![logo](https://cdn.rawgit.com/nextcloud/docker/071b888f7f689caa62c1498b6c61cb3599bcea2b/logo.svg) From 99ddd0978372e6dc17e4d923b33e543aae7eee35 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Thu, 5 Dec 2024 20:29:40 +0000 Subject: [PATCH 117/123] Runs update.sh --- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/fpm/Dockerfile | 6 +++--- 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 | 18 +++++++++--------- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/28/apache/Dockerfile b/28/apache/Dockerfile index 00bfaa72..11fa8e36 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.12 +ENV NEXTCLOUD_VERSION 28.0.13 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-28.0.12.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 18af3386..9da00f0f 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.12 +ENV NEXTCLOUD_VERSION 28.0.13 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index 40598ea8..3a1d69b7 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.12 +ENV NEXTCLOUD_VERSION 28.0.13 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-28.0.12.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.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/apache/Dockerfile b/29/apache/Dockerfile index 8e9316c9..a4367003 100644 --- a/29/apache/Dockerfile +++ b/29/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 29.0.8 +ENV NEXTCLOUD_VERSION 29.0.10 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.10.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.10.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 5344aed5..4e147a5c 100644 --- a/29/fpm-alpine/Dockerfile +++ b/29/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.8 +ENV NEXTCLOUD_VERSION 29.0.10 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.10.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.10.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 a69317bb..d18949cd 100644 --- a/29/fpm/Dockerfile +++ b/29/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 29.0.8 +ENV NEXTCLOUD_VERSION 29.0.10 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.8.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-29.0.10.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.10.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 0e0fd6aa..ef5633f3 100644 --- a/30/apache/Dockerfile +++ b/30/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 30.0.2 +ENV NEXTCLOUD_VERSION 30.0.3 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.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 79783a65..323a81a4 100644 --- a/30/fpm-alpine/Dockerfile +++ b/30/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 30.0.2 +ENV NEXTCLOUD_VERSION 30.0.3 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.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 4258ff9d..907b3f17 100644 --- a/30/fpm/Dockerfile +++ b/30/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 30.0.2 +ENV NEXTCLOUD_VERSION 30.0.3 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.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 4f3a0694..4c7e3269 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -30.0.2 +30.0.3 diff --git a/versions.json b/versions.json index 94f93c36..762674b1 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "30": { "branch": "30", - "version": "30.0.2", - "url": "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2.asc", + "version": "30.0.3", + "url": "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -27,9 +27,9 @@ }, "29": { "branch": "29", - "version": "29.0.8", - "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.8.tar.bz2.asc", + "version": "29.0.10", + "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.10.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.10.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -53,9 +53,9 @@ }, "28": { "branch": "28", - "version": "28.0.12", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2.asc", + "version": "28.0.13", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From 2d45183b8db35cd77b76837be2d34b3f88a0a889 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Sat, 7 Dec 2024 00:35:06 +0000 Subject: [PATCH 118/123] Runs update.sh --- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/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/28/apache/Dockerfile b/28/apache/Dockerfile index 11fa8e36..00bfaa72 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.13 +ENV NEXTCLOUD_VERSION 28.0.12 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-28.0.13.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 9da00f0f..18af3386 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.13 +ENV NEXTCLOUD_VERSION 28.0.12 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index 3a1d69b7..40598ea8 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.13 +ENV NEXTCLOUD_VERSION 28.0.12 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-28.0.13.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.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 ef5633f3..0e0fd6aa 100644 --- a/30/apache/Dockerfile +++ b/30/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 30.0.3 +ENV NEXTCLOUD_VERSION 30.0.2 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.3.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.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 323a81a4..79783a65 100644 --- a/30/fpm-alpine/Dockerfile +++ b/30/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 30.0.3 +ENV NEXTCLOUD_VERSION 30.0.2 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.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 907b3f17..4258ff9d 100644 --- a/30/fpm/Dockerfile +++ b/30/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 30.0.3 +ENV NEXTCLOUD_VERSION 30.0.2 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.3.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.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 4c7e3269..4f3a0694 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -30.0.3 +30.0.2 diff --git a/versions.json b/versions.json index 762674b1..31550da5 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "30": { "branch": "30", - "version": "30.0.3", - "url": "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-30.0.3.tar.bz2.asc", + "version": "30.0.2", + "url": "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -53,9 +53,9 @@ }, "28": { "branch": "28", - "version": "28.0.13", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.13.tar.bz2.asc", + "version": "28.0.12", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From f4138903323bfb04326373804ea3dbbd4ffe94e4 Mon Sep 17 00:00:00 2001 From: GitHub Workflow Date: Thu, 12 Dec 2024 12:01:29 +0000 Subject: [PATCH 119/123] Runs update.sh --- 28/apache/Dockerfile | 6 +++--- 28/fpm-alpine/Dockerfile | 6 +++--- 28/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/28/apache/Dockerfile b/28/apache/Dockerfile index 00bfaa72..2060d4b0 100644 --- a/28/apache/Dockerfile +++ b/28/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 28.0.12 +ENV NEXTCLOUD_VERSION 28.0.14 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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-28.0.12.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.14.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.14.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/28/fpm-alpine/Dockerfile b/28/fpm-alpine/Dockerfile index 18af3386..02cd4a23 100644 --- a/28/fpm-alpine/Dockerfile +++ b/28/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.12 +ENV NEXTCLOUD_VERSION 28.0.14 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.14.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.14.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/28/fpm/Dockerfile b/28/fpm/Dockerfile index 40598ea8..3bf63e27 100644 --- a/28/fpm/Dockerfile +++ b/28/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 28.0.12 +ENV NEXTCLOUD_VERSION 28.0.14 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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-28.0.12.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-28.0.14.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.14.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 0e0fd6aa..73ac6ccc 100644 --- a/30/apache/Dockerfile +++ b/30/apache/Dockerfile @@ -140,7 +140,7 @@ RUN { \ } > /etc/apache2/conf-available/apache-limits.conf; \ a2enconf apache-limits -ENV NEXTCLOUD_VERSION 30.0.2 +ENV NEXTCLOUD_VERSION 30.0.4 RUN set -ex; \ fetchDeps=" \ @@ -150,8 +150,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.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.4.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.4.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 79783a65..52ea716c 100644 --- a/30/fpm-alpine/Dockerfile +++ b/30/fpm-alpine/Dockerfile @@ -120,7 +120,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 30.0.2 +ENV NEXTCLOUD_VERSION 30.0.4 RUN set -ex; \ apk add --no-cache --virtual .fetch-deps \ @@ -128,8 +128,8 @@ RUN set -ex; \ gnupg \ ; \ \ - curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.4.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.4.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 4258ff9d..dfe49612 100644 --- a/30/fpm/Dockerfile +++ b/30/fpm/Dockerfile @@ -125,7 +125,7 @@ RUN { \ VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 30.0.2 +ENV NEXTCLOUD_VERSION 30.0.4 RUN set -ex; \ fetchDeps=" \ @@ -135,8 +135,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.2.tar.bz2"; \ - curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2.asc"; \ + curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/nextcloud-30.0.4.tar.bz2"; \ + curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-30.0.4.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 4f3a0694..49ab6171 100644 --- a/latest.txt +++ b/latest.txt @@ -1 +1 @@ -30.0.2 +30.0.4 diff --git a/versions.json b/versions.json index 31550da5..ec8b3ca9 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,9 @@ { "30": { "branch": "30", - "version": "30.0.2", - "url": "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-30.0.2.tar.bz2.asc", + "version": "30.0.4", + "url": "https://download.nextcloud.com/server/releases/nextcloud-30.0.4.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-30.0.4.tar.bz2.asc", "variants": { "apache": { "variant": "apache", @@ -53,9 +53,9 @@ }, "28": { "branch": "28", - "version": "28.0.12", - "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2", - "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.12.tar.bz2.asc", + "version": "28.0.14", + "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.14.tar.bz2", + "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.14.tar.bz2.asc", "variants": { "apache": { "variant": "apache", From 035003969a90a1b872da5e805adc1380c277af0d Mon Sep 17 00:00:00 2001 From: J0WI Date: Thu, 12 Dec 2024 21:33:41 +0000 Subject: [PATCH 120/123] Bump stable to 30.0.4 Signed-off-by: J0WI --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 7a1332ef..f65b49ed 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -stable_channel='30.0.2' +stable_channel='30.0.4' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From 2f4de23ea11705a977984c273082efa2d4dcf743 Mon Sep 17 00:00:00 2001 From: Josh Date: Sat, 14 Dec 2024 14:24:34 -0500 Subject: [PATCH 121/123] docs(README): Basic status badges Signed-off-by: Josh --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index b3d5e7df..152489b2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ +![GitHub last commit](https://img.shields.io/github/last-commit/nextcloud/docker) +[![GitHub Release](https://img.shields.io/github/v/release/nextcloud/docker?link=https%3A%2F%2Fgithub.com%2Fnextcloud%2Fdocker%2Freleases%2Flatest&label=latest%20Image)](https://github.com/nextcloud/docker/releases/) +[![Docker Image Version](https://img.shields.io/docker/v/library/nextcloud?sort=semver&logo=nextcloud&label=Nextcloud)](https://nextcloud.com/changelog/) +![GitHub commits since latest release](https://img.shields.io/github/commits-since/nextcloud/docker/latest) +![GitHub commit activity](https://img.shields.io/github/commit-activity/m/nextcloud/docker) +![GitHub contributors](https://img.shields.io/github/contributors/nextcloud/docker?label=contributors%20-%20Thank%20you!) +![Docker Pulls](https://img.shields.io/docker/pulls/library/nextcloud) + # What is Nextcloud? A safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms. @@ -19,6 +27,9 @@ The second option is a `fpm` container. It is based on the [php-fpm](https://hub Most Nextcloud Server administrative matters are covered in the official [Nextcloud Admin Manual](https://docs.nextcloud.com/server/latest/admin_manual/) or [other official Nextcloud documentation](https://docs.nextcloud.com) (which are all routinely updated). +[![Discourse Users](https://img.shields.io/discourse/users?server=https%3A%2F%2Fhelp.nextcloud.com&label=Community%20Forum&color=blue&link=https%3A%2F%2Fhelp.nextcloud.com%2F)](https://help.nextcloud.com/) +[![Discourse Posts](https://img.shields.io/discourse/posts?server=https%3A%2F%2Fhelp.nextcloud.com&label=Community%20Forum&color=blue&link=https%3A%2F%2Fhelp.nextcloud.com%2F)](https://help.nextcloud.com/) + **If you have any problems or usage questions while using the image, please ask for assistance on the [Nextcloud Community Help Forum](https://help.nextcloud.com)** rather than reporting them as "bugs" (unless they are bugs of course). This helps the maintainers (who are volunteers) remain focused on making the image better (rather than responding solely to one-on-one support issues). (Tip: Some of the maintainers are also regular responders to help requests on the [community help forum](https://help.nextcloud.com/).) @@ -732,8 +743,16 @@ If there is a relevant existing open issue, you can either add to the discussion If you believe you've found a new bug, please create a new Issue so that others can try to reproduce it and remediation can be tracked. +![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/nextcloud/docker?label=Open%20Issues) +![GitHub Issues or Pull Requests by label](https://img.shields.io/github/issues/nextcloud/docker/bug?style=flat&label=Bug%20Reports&color=red) +![GitHub Issues or Pull Requests by label](https://img.shields.io/github/issues/nextcloud/docker/enhancement?style=flat&label=Enhancement%20Ideas&color=green) +![GitHub Issues or Pull Requests by label](https://img.shields.io/github/issues/nextcloud/docker/good%20first%20issue?style=flat&label=Good%20First%20Issues) + **If you have any problems or usage questions while using the image, please ask for assistance on the [Nextcloud Community Help Forum](https://help.nextcloud.com)** rather than reporting them as "bugs" (unless they really are bugs of course). This helps the maintainers (who are volunteers) remain focused on making the image better (rather than responding solely to one-on-one support issues). (Tip: Some of the maintainers are also regular responders to help requests on the [Nextcloud Community Help Forum](https://help.nextcloud.com).) +[![Discourse Users](https://img.shields.io/discourse/users?server=https%3A%2F%2Fhelp.nextcloud.com&label=Community%20Forum&color=blue&link=https%3A%2F%2Fhelp.nextcloud.com%2F)](https://help.nextcloud.com/) +[![Discourse Posts](https://img.shields.io/discourse/posts?server=https%3A%2F%2Fhelp.nextcloud.com&label=Community%20Forum&color=blue&link=https%3A%2F%2Fhelp.nextcloud.com%2F)](https://help.nextcloud.com/) + Most Nextcloud Server matters are covered in the official [Nextcloud Admin Manual](https://docs.nextcloud.com/server/latest/admin_manual/) or the [other official Nextcloud documentation](https://docs.nextcloud.com) (which are routinely updated). From d5c6e2ff0ec45631163153d22db03bca4bc65513 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 23 Dec 2024 09:03:54 -0500 Subject: [PATCH 122/123] docs(readme): Add community helm chart link Signed-off-by: Josh --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 152489b2..6745faa3 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/nextcloud/docker) ![GitHub contributors](https://img.shields.io/github/contributors/nextcloud/docker?label=contributors%20-%20Thank%20you!) ![Docker Pulls](https://img.shields.io/docker/pulls/library/nextcloud) +[![Helm](https://img.shields.io/badge/Helm-0F1689?logo=helm&logoColor=fff)](https://github.com/nextcloud/helm/?tab=readme-ov-file) # What is Nextcloud? From 08ac24880cc34d5e351bba72da219a99af253ba5 Mon Sep 17 00:00:00 2001 From: J0WI Date: Thu, 9 Jan 2025 23:01:21 +0000 Subject: [PATCH 123/123] 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" } }