diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index cea5d93b23..602dca6740 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -20,6 +20,7 @@ RUN set -ex; \ # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M ENV PHP_UPLOAD_LIMIT 512M +%%VARIANT_EXTRAS_ENV%% RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/update.sh b/update.sh index 3e85ef8449..f4dd78c3a2 100755 --- a/update.sh +++ b/update.sh @@ -28,8 +28,14 @@ declare -A base=( [fpm-alpine]='alpine' ) +declare -A extras_env=( + [apache]='ENV APACHE_BODY_LIMIT 1073741824' + [fpm]='' + [fpm-alpine]='' +) + declare -A extras=( - [apache]='\nRUN a2enmod headers rewrite remoteip ;\\\n {\\\n echo RemoteIPHeader X-Real-IP ;\\\n echo RemoteIPInternalProxy 10.0.0.0/8 ;\\\n echo RemoteIPInternalProxy 172.16.0.0/12 ;\\\n echo RemoteIPInternalProxy 192.168.0.0/16 ;\\\n } > /etc/apache2/conf-available/remoteip.conf;\\\n a2enconf remoteip' + [apache]='\nRUN a2enmod headers rewrite remoteip ; \\\n { \\\n echo '\''RemoteIPHeader X-Real-IP'\''; \\\n echo '\''RemoteIPInternalProxy 10.0.0.0/8'\''; \\\n echo '\''RemoteIPInternalProxy 172.16.0.0/12'\''; \\\n echo '\''RemoteIPInternalProxy 192.168.0.0/16'\''; \\\n } > /etc/apache2/conf-available/remoteip.conf; \\\n a2enconf remoteip\n\n# set apache config LimitRequestBody\nRUN { \\\n echo '\''LimitRequestBody ${APACHE_BODY_LIMIT}'\''; \\\n } > /etc/apache2/conf-available/apache-limits.conf; \\\n a2enconf apache-limits' [fpm]='' [fpm-alpine]='' ) @@ -130,6 +136,7 @@ function create_variant() { s/%%DOWNLOAD_URL%%/'"$(sed -e 's/[\/&]/\\&/g' <<< "$url")"'/g; s/%%DOWNLOAD_URL_ASC%%/'"$(sed -e 's/[\/&]/\\&/g' <<< "$ascUrl")"'/g; s/%%CMD%%/'"${cmd[$variant]}"'/g; + s|%%VARIANT_EXTRAS_ENV%%|'"${extras_env[$variant]}"'|g; s|%%VARIANT_EXTRAS%%|'"${extras[$variant]}"'|g; s/%%APCU_VERSION%%/'"${pecl_versions[APCu]}"'/g; s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g;