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 \ diff --git a/README.md b/README.md index b9f7a66d..c012608d 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 8e178f2e..87336074 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -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"'