Add support for setting PHP CLI memory limit individually
This commit is contained in:
parent
df5a3cca24
commit
0286cbb4d9
1 changed files with 3 additions and 0 deletions
|
|
@ -10,8 +10,11 @@ else
|
|||
PHP_MEMORY_LIMIT="${PHP_MEMORY_LIMIT:-128M}"
|
||||
fi
|
||||
|
||||
PHP_CLI_MEMORY_LIMIT="${PHP_CLI_MEMORY_LIMIT:-$PHP_MEMORY_LIMIT}"
|
||||
|
||||
sed -i "s|memory_limit = .*|memory_limit = ${PHP_MEMORY_LIMIT}|g" /etc/php/{{PHP}}/fpm/php.ini
|
||||
sed -i "s|\[memory_limit\] = .*|\[memory_limit\] = ${PHP_MEMORY_LIMIT}|g" /etc/php/{{PHP}}/fpm/pool.d/www.conf
|
||||
sed -i "s|memory_limit = .*|memory_limit = ${PHP_CLI_MEMORY_LIMIT}|g" /etc/php/{{PHP}}/cli/php.ini
|
||||
|
||||
if [ $ENABLE_DEBUG_MODE = true ]; then
|
||||
echo -e "#Controlled via DEBUG_MODE environment variable\nzend_extension=xdebug.so\n[xdebug]\n\
|
||||
|
|
|
|||
Loading…
Reference in a new issue