summaryrefslogtreecommitdiffstats
path: root/Dockerfile-alpine.template
diff options
context:
space:
mode:
authorJ0WI <J0WI@users.noreply.github.com>2021-02-19 13:57:58 +0000
committerGitHub <noreply@github.com>2021-02-19 13:57:58 +0000
commit061d860c0e711c3b4e9e08b2e67b34a4c33a1156 (patch)
treeb87d243f3eb16b5de11f8cd748f14cdbda92bbad /Dockerfile-alpine.template
parentb6925e9b4590fe25e238bd48a7461a5839055f5d (diff)
Implement essential php.ini configuration via ENV (#1379)
Signed-off-by: J0WI <J0WI@users.noreply.github.com> Co-Authored-By: Alexander Sosna <alexander.sosna@credativ.de> Co-Authored-By: =?UTF-8?q?Alexander=20Gr=C3=BC=C3=9Fung?= <alexander@gruessung-online.de> Co-authored-by: Alexander Sosna <alexander.sosna@credativ.de> Co-authored-by: =?UTF-8?q?Alexander=20Gr=C3=BC=C3=9Fung?= <alexander@gruessung-online.de>
Diffstat (limited to 'Dockerfile-alpine.template')
-rw-r--r--Dockerfile-alpine.template10
1 files changed, 8 insertions, 2 deletions
diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template
index f4e97fe0..0a9484d4 100644
--- a/Dockerfile-alpine.template
+++ b/Dockerfile-alpine.template
@@ -73,7 +73,9 @@ RUN set -ex; \
apk del .build-deps
# set recommended PHP.ini settings
-# see https://docs.nextcloud.com/server/12/admin_manual/configuration_server/server_tuning.html#enable-php-opcache
+# see https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/server_tuning.html#enable-php-opcache
+ENV PHP_MEMORY_LIMIT 512M
+ENV PHP_UPLOAD_LIMIT 512M
RUN { \
echo 'opcache.enable=1'; \
echo 'opcache.interned_strings_buffer=8'; \
@@ -85,7 +87,11 @@ RUN { \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
- echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
+ { \
+ echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
+ echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \
+ echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \
+ } > /usr/local/etc/php/conf.d/nextcloud.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \