0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-07-29 18:08:06 +02:00

Compare commits

...

4 commits

Author SHA1 Message Date
Olliver Schinagl
df498e8cc8
Merge 94bff07f59 into 65138b6d22 2024-07-24 07:38:55 +02:00
J0WI
65138b6d22
Bump stable to 29.0.4 (fix #2258)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2024-07-20 12:47:17 +00:00
GitHub Workflow
258cc4ee2d Runs update.sh 2024-07-19 01:05:00 +00:00
Olliver Schinagl
94bff07f59
autoconfig: Allow mixing _FILE variables
We do not always need to configure variables as either a file or not for
all variables.

Instead, allow us to mix-match variable storage. This allows us to keep
all non-critical variables in regular (env) variables, but keep the
password in a (secret) file only location.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2023-05-29 23:07:43 +02:00
10 changed files with 66 additions and 48 deletions

View file

@ -6,32 +6,50 @@ if (getenv('SQLITE_DATABASE')) {
$AUTOCONFIG['dbtype'] = 'sqlite'; $AUTOCONFIG['dbtype'] = 'sqlite';
$AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE'); $AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE');
$autoconfig_enabled = true; $autoconfig_enabled = true;
} elseif (getenv('MYSQL_DATABASE_FILE') && getenv('MYSQL_USER_FILE') && getenv('MYSQL_PASSWORD_FILE') && getenv('MYSQL_HOST')) { } else if ((getenv('MYSQL_DATABASE_FILE') || getenv('MYSQL_DATABASE')) &&
(getenv('MYSQL_USER_FILE') || getenv('MYSQL_USER')) &&
(getenv('MYSQL_PASSWORD_FILE') || getenv('MYSQL_PASSWORD')) &&
getenv('MYSQL_HOST')) {
$AUTOCONFIG['dbtype'] = 'mysql'; $AUTOCONFIG['dbtype'] = 'mysql';
if (getenv('MYSQL_DATABASE_FILE'))
$AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('MYSQL_DATABASE_FILE'))); $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('MYSQL_DATABASE_FILE')));
$AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('MYSQL_USER_FILE'))); elseif (getenv('MYSQL_DATABASE'))
$AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('MYSQL_PASSWORD_FILE')));
$AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST');
$autoconfig_enabled = true;
} elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) {
$AUTOCONFIG['dbtype'] = 'mysql';
$AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE'); $AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE');
if (getenv('MYSQL_USER_FILE'))
$AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('MYSQL_USER_FILE')));
elseif (getenv('MYSQL_USER'))
$AUTOCONFIG['dbuser'] = getenv('MYSQL_USER'); $AUTOCONFIG['dbuser'] = getenv('MYSQL_USER');
if (getenv('MYSQL_PASSWORD_FILE'))
$AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('MYSQL_PASSWORD_FILE')));
elseif (getenv('MYSQL_PASSWORD'))
$AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD'); $AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD');
$AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST'); $AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST');
$autoconfig_enabled = true; $autoconfig_enabled = true;
} elseif (getenv('POSTGRES_DB_FILE') && getenv('POSTGRES_USER_FILE') && getenv('POSTGRES_PASSWORD_FILE') && getenv('POSTGRES_HOST')) { } elseif ((getenv('POSTGRES_DB_FILE') || getenv('POSTGRES_DB')) &&
(getenv('POSTGRES_USER_FILE') || getenv('POSTGRES_USER')) &&
(getenv('POSTGRES_PASSWORD_FILE') || getenv('POSTGRES_PASSWORD')) &&
getenv('POSTGRES_HOST')) {
$AUTOCONFIG['dbtype'] = 'pgsql'; $AUTOCONFIG['dbtype'] = 'pgsql';
if (getenv('POSTGRES_DB_FILE'))
$AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('POSTGRES_DB_FILE'))); $AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('POSTGRES_DB_FILE')));
$AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('POSTGRES_USER_FILE'))); elseif (getenv('POSTGRES_DB'))
$AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('POSTGRES_PASSWORD_FILE')));
$AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST');
$autoconfig_enabled = true;
} elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) {
$AUTOCONFIG['dbtype'] = 'pgsql';
$AUTOCONFIG['dbname'] = getenv('POSTGRES_DB'); $AUTOCONFIG['dbname'] = getenv('POSTGRES_DB');
if (getenv('POSTGRES_USER_FILE'))
trim(file_get_contents(getenv('POSTGRES_USER_FILE')));
elseif (getenv('POSTGRES_USER'))
$AUTOCONFIG['dbuser'] = getenv('POSTGRES_USER'); $AUTOCONFIG['dbuser'] = getenv('POSTGRES_USER');
if (getenv('POSTGRES_PASSWORD_FILE'))
$AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('POSTGRES_PASSWORD_FILE')));
elseif (getenv('POSTGRES_PASSWORD'))
$AUTOCONFIG['dbpass'] = getenv('POSTGRES_PASSWORD'); $AUTOCONFIG['dbpass'] = getenv('POSTGRES_PASSWORD');
$AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST'); $AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST');
$autoconfig_enabled = true; $autoconfig_enabled = true;
} }

View file

@ -140,7 +140,7 @@ RUN { \
} > /etc/apache2/conf-available/apache-limits.conf; \ } > /etc/apache2/conf-available/apache-limits.conf; \
a2enconf apache-limits a2enconf apache-limits
ENV NEXTCLOUD_VERSION 28.0.7 ENV NEXTCLOUD_VERSION 28.0.8
RUN set -ex; \ RUN set -ex; \
fetchDeps=" \ fetchDeps=" \
@ -150,8 +150,8 @@ RUN set -ex; \
apt-get update; \ apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \ 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 "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.7.tar.bz2.asc"; \ curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2.asc"; \
export GNUPGHOME="$(mktemp -d)"; \ export GNUPGHOME="$(mktemp -d)"; \
# gpg key from https://nextcloud.com/nextcloud.asc # gpg key from https://nextcloud.com/nextcloud.asc
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \

View file

@ -120,7 +120,7 @@ RUN { \
VOLUME /var/www/html VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 28.0.7 ENV NEXTCLOUD_VERSION 28.0.8
RUN set -ex; \ RUN set -ex; \
apk add --no-cache --virtual .fetch-deps \ apk add --no-cache --virtual .fetch-deps \
@ -128,8 +128,8 @@ RUN set -ex; \
gnupg \ 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 "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.7.tar.bz2.asc"; \ curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2.asc"; \
export GNUPGHOME="$(mktemp -d)"; \ export GNUPGHOME="$(mktemp -d)"; \
# gpg key from https://nextcloud.com/nextcloud.asc # gpg key from https://nextcloud.com/nextcloud.asc
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \

View file

@ -125,7 +125,7 @@ RUN { \
VOLUME /var/www/html VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 28.0.7 ENV NEXTCLOUD_VERSION 28.0.8
RUN set -ex; \ RUN set -ex; \
fetchDeps=" \ fetchDeps=" \
@ -135,8 +135,8 @@ RUN set -ex; \
apt-get update; \ apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \ 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 "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.7.tar.bz2.asc"; \ curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2.asc"; \
export GNUPGHOME="$(mktemp -d)"; \ export GNUPGHOME="$(mktemp -d)"; \
# gpg key from https://nextcloud.com/nextcloud.asc # gpg key from https://nextcloud.com/nextcloud.asc
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \

View file

@ -140,7 +140,7 @@ RUN { \
} > /etc/apache2/conf-available/apache-limits.conf; \ } > /etc/apache2/conf-available/apache-limits.conf; \
a2enconf apache-limits a2enconf apache-limits
ENV NEXTCLOUD_VERSION 29.0.3 ENV NEXTCLOUD_VERSION 29.0.4
RUN set -ex; \ RUN set -ex; \
fetchDeps=" \ fetchDeps=" \
@ -150,8 +150,8 @@ RUN set -ex; \
apt-get update; \ apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \ 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 "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.3.tar.bz2.asc"; \ curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2.asc"; \
export GNUPGHOME="$(mktemp -d)"; \ export GNUPGHOME="$(mktemp -d)"; \
# gpg key from https://nextcloud.com/nextcloud.asc # gpg key from https://nextcloud.com/nextcloud.asc
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \

View file

@ -120,7 +120,7 @@ RUN { \
VOLUME /var/www/html VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 29.0.3 ENV NEXTCLOUD_VERSION 29.0.4
RUN set -ex; \ RUN set -ex; \
apk add --no-cache --virtual .fetch-deps \ apk add --no-cache --virtual .fetch-deps \
@ -128,8 +128,8 @@ RUN set -ex; \
gnupg \ 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 "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.3.tar.bz2.asc"; \ curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2.asc"; \
export GNUPGHOME="$(mktemp -d)"; \ export GNUPGHOME="$(mktemp -d)"; \
# gpg key from https://nextcloud.com/nextcloud.asc # gpg key from https://nextcloud.com/nextcloud.asc
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \

View file

@ -125,7 +125,7 @@ RUN { \
VOLUME /var/www/html VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 29.0.3 ENV NEXTCLOUD_VERSION 29.0.4
RUN set -ex; \ RUN set -ex; \
fetchDeps=" \ fetchDeps=" \
@ -135,8 +135,8 @@ RUN set -ex; \
apt-get update; \ apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \ 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 "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.3.tar.bz2.asc"; \ curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2.asc"; \
export GNUPGHOME="$(mktemp -d)"; \ export GNUPGHOME="$(mktemp -d)"; \
# gpg key from https://nextcloud.com/nextcloud.asc # gpg key from https://nextcloud.com/nextcloud.asc
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -Eeuo pipefail set -Eeuo pipefail
stable_channel='28.0.7' stable_channel='29.0.4'
self="$(basename "$BASH_SOURCE")" self="$(basename "$BASH_SOURCE")"
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"

View file

@ -1 +1 @@
29.0.3 29.0.4

View file

@ -1,9 +1,9 @@
{ {
"29": { "29": {
"branch": "29", "branch": "29",
"version": "29.0.3", "version": "29.0.4",
"url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2", "url": "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2",
"ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.3.tar.bz2.asc", "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2.asc",
"variants": { "variants": {
"apache": { "apache": {
"variant": "apache", "variant": "apache",
@ -27,9 +27,9 @@
}, },
"28": { "28": {
"branch": "28", "branch": "28",
"version": "28.0.7", "version": "28.0.8",
"url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2", "url": "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2",
"ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.7.tar.bz2.asc", "ascUrl": "https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2.asc",
"variants": { "variants": {
"apache": { "apache": {
"variant": "apache", "variant": "apache",