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

Compare commits

...

5 commits

Author SHA1 Message Date
rmelotte
5d4a564f44
Merge 70358187fd into 65138b6d22 2024-07-29 11:09:41 +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
Raphaël Mélotte
70358187fd docker-entrypoint.sh: exit if DB host not set
Since all DB variables but the host can be set using secrets (by
appending '_FILE' to the variable name), it can be easy for a user to
mis-configure their DB host variable by storing them in
MYSQL_HOST_FILE or POSTGRESQL_HOST_FILE (which is not supported).
When that happens, the auto configuration is skipped.
Such a situation is a bit cumbersome to figure out as nothing
indicates why the auto configuration is skipped.
To make to make it obvious to the user, exit early if DB variables
have been set (using secrets or not), but the host has not been
set (for example, because it was set in MYSQL_HOST_FILE).

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
2023-09-26 13:32:04 +02:00
Raphaël Mélotte
f4429bb0ff README.md: clarify that _HOST variables cannot be files
The auto configuration sections seems to imply that POSTGRES_HOST and
MYSQL_HOST can be file variables, while this is not supported. If all
variables are set as files including the host, the installation will
not be done automatically.
This can be hard to figure out, as during the first start of the
container nothing indicates why the auto configuration is not done.

To try to make it a bit clearer in the README, explicitly mention that
using a file for the hosts variable is not supported.

Furthermore, in the docker secrets section it's currently easy to
misread the fact that the last variable mentioned (the host) is not
using '_FILE'. Since it's anyway not part of the group of variables
that support secrets, remove it from the list to avoid confusion.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
2023-09-26 13:32:01 +02:00
11 changed files with 38 additions and 30 deletions

View file

@ -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; \

View file

@ -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; \

View file

@ -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; \

View file

@ -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; \

View file

@ -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; \

View file

@ -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; \

View file

@ -132,7 +132,7 @@ __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 (except for `POSTGRES_HOST` and `MYSQL_HOST`, which cannot be loaded from files), , causing the initialization script to load the values for those variables from files present in the container. See [Docker secrets](#docker-secrets) section below.
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):
@ -448,7 +448,7 @@ secrets:
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`).
If you set any group of values (i.e. all of `MYSQL_DATABASE_FILE`, `MYSQL_USER_FILE`, `MYSQL_PASSWORD_FILE`), the script will not use the corresponding group of environment variables (`MYSQL_DATABASE`, `MYSQL_USER`, `MYSQL_PASSWORD`).
# 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.

View file

@ -207,12 +207,20 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
# 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
elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ]; then
if [ -z "${MYSQL_HOST}" ] ; then
echo "MySQL credentials set but no MySQL host set. Please make sure \$MYSQL_HOST is set."
exit 1
fi
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
elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ]; then
if [ -z "${POSTGRES_HOST}" ] ; then
echo "PostgreSQL credentials set but no PostgreSQL host set. Please make sure \$POSTGRES_HOST is set."
exit 1
fi
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"'

View file

@ -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")")"

View file

@ -1 +1 @@
29.0.3
29.0.4

View file

@ -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",