0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-25 04:40:55 +02:00

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>
This commit is contained in:
J0WI 2021-02-19 13:57:58 +00:00 committed by GitHub
parent b6925e9b45
commit 061d860c0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 4 deletions

View file

@ -16,6 +16,8 @@ RUN set -ex; \
# install the PHP extensions we need
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
ENV PHP_MEMORY_LIMIT 512M
ENV PHP_UPLOAD_LIMIT 512M
RUN set -ex; \
\
savedAptMark="$(apt-mark showmanual)"; \
@ -86,7 +88,7 @@ RUN set -ex; \
rm -rf /var/lib/apt/lists/*
# 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
RUN { \
echo 'opcache.enable=1'; \
echo 'opcache.interned_strings_buffer=8'; \
@ -98,7 +100,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; \