diff --git a/14.0/apache/entrypoint.sh b/14.0/apache/entrypoint.sh index 045227e8..6498d631 100755 --- a/14.0/apache/entrypoint.sh +++ b/14.0/apache/entrypoint.sh @@ -127,6 +127,20 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi fi + + if [ -n "${NEXTCLOUD_OVERWRITEHOST+x}" ]; then + echo "setting overwritehost…" + run_as "php /var/www/html/occ config:system:set overwritehost --value=$NEXTCLOUD_OVERWRITEHOST" + fi + if [ -n "${NEXTCLOUD_OVERWRITEPROTOCOL+x}" ]; then + echo "setting overwriteprotocol…" + run_as "php /var/www/html/occ config:system:set overwriteprotocol --value=$NEXTCLOUD_OVERWRITEPROTOCOL" + fi + if [ -n "${NEXTCLOUD_OVERWRITEWEBROOT+x}" ]; then + echo "setting overwritewebroot…" + run_as "php /var/www/html/occ config:system:set overwritewebroot --value=$NEXTCLOUD_OVERWRITEWEBROOT" + fi + fi exec "$@" diff --git a/14.0/fpm-alpine/entrypoint.sh b/14.0/fpm-alpine/entrypoint.sh index 045227e8..6498d631 100755 --- a/14.0/fpm-alpine/entrypoint.sh +++ b/14.0/fpm-alpine/entrypoint.sh @@ -127,6 +127,20 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi fi + + if [ -n "${NEXTCLOUD_OVERWRITEHOST+x}" ]; then + echo "setting overwritehost…" + run_as "php /var/www/html/occ config:system:set overwritehost --value=$NEXTCLOUD_OVERWRITEHOST" + fi + if [ -n "${NEXTCLOUD_OVERWRITEPROTOCOL+x}" ]; then + echo "setting overwriteprotocol…" + run_as "php /var/www/html/occ config:system:set overwriteprotocol --value=$NEXTCLOUD_OVERWRITEPROTOCOL" + fi + if [ -n "${NEXTCLOUD_OVERWRITEWEBROOT+x}" ]; then + echo "setting overwritewebroot…" + run_as "php /var/www/html/occ config:system:set overwritewebroot --value=$NEXTCLOUD_OVERWRITEWEBROOT" + fi + fi exec "$@" diff --git a/14.0/fpm/entrypoint.sh b/14.0/fpm/entrypoint.sh index 045227e8..6498d631 100755 --- a/14.0/fpm/entrypoint.sh +++ b/14.0/fpm/entrypoint.sh @@ -127,6 +127,20 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP fi fi + + if [ -n "${NEXTCLOUD_OVERWRITEHOST+x}" ]; then + echo "setting overwritehost…" + run_as "php /var/www/html/occ config:system:set overwritehost --value=$NEXTCLOUD_OVERWRITEHOST" + fi + if [ -n "${NEXTCLOUD_OVERWRITEPROTOCOL+x}" ]; then + echo "setting overwriteprotocol…" + run_as "php /var/www/html/occ config:system:set overwriteprotocol --value=$NEXTCLOUD_OVERWRITEPROTOCOL" + fi + if [ -n "${NEXTCLOUD_OVERWRITEWEBROOT+x}" ]; then + echo "setting overwritewebroot…" + run_as "php /var/www/html/occ config:system:set overwritewebroot --value=$NEXTCLOUD_OVERWRITEWEBROOT" + fi + fi exec "$@" diff --git a/README.md b/README.md index 4dcab644..66a3555d 100644 --- a/README.md +++ b/README.md @@ -134,8 +134,9 @@ If Nextcloud fails to automatically detect the hostname, protocol or webroot you - `NEXTCLOUD_OVERWRITEHOST` The overwritehost parameter is used to set the hostname of the proxy. You can also specify a port. - `NEXTCLOUD_OVERWRITEPROTOCOL` The overwriteprotocol parameter is used to set the protocol of the proxy. You can choose between the two options http and https. +- `NEXTCLOUD_OVERWRITEWEBROOT` The overwritewebroot parameter is used to set the absolute web path of the proxy to the Nextcloud folder. -These two parameters are available in v14.0+ +These parameters are available in v14.0+ # 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 what you have to look for.