2
0
Fork 0
mirror of https://github.com/friendica/docker synced 2025-12-07 13:57:07 +01:00

Add PHP limit environment variables

This commit is contained in:
Philipp Holzer 2021-12-12 21:18:07 +01:00
commit 65e3ffab9c
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432
12 changed files with 84 additions and 11 deletions

View file

@ -118,6 +118,8 @@ RUN set -ex; \
rm -rf /var/lib/apt/lists/*
# set recommended PHP.ini settings
ENV PHP_MEMORY_LIMIT 512M
ENV PHP_UPLOAD_LIMIT 512M
RUN set -ex; \
{ \
echo 'opcache.enable=1' ; \
@ -134,7 +136,11 @@ RUN set -ex; \
\
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/friendica.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \