bundles/php: allow configuring of memory_limit and clear_env

This commit is contained in:
Franzi 2021-12-18 18:54:00 +01:00
parent 2b06c77439
commit 376dba347f
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 10 additions and 1 deletions

View file

@ -21,3 +21,7 @@ pm.max_spare_servers=${num_cpus*2}
pm.min_spare_servers=${num_cpus}
pm.process_idle_timeout=30s
pm.max_requests=1024
% if not clear_env:
clear_env=no
% endif

View file

@ -14,7 +14,7 @@ expose_php = Off
max_execution_time = 30
max_input_time = 60
memory_limit = 256M
memory_limit = ${memory_limit}M
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_startup_errors = Off

View file

@ -6,6 +6,7 @@ files = {
'content_type': 'mako',
'context': {
'num_cpus': node.metadata['vm']['cpu'],
'clear_env': node.metadata.get('php/clear_env', True),
},
'needs': {
# "all php packages"
@ -17,9 +18,11 @@ files = {
},
f'/etc/php/{version}/fpm/php.ini': {
'source': f'{version}/php.ini',
'content_type': 'mako',
'context': {
'num_cpus': node.metadata['vm']['cpu'],
'post_max_size': node.metadata['php'].get('post_max_size', 10),
'memory_limit': node.metadata.get('php/memory_limit', 256),
},
'needs': {
# "all php packages"
@ -31,9 +34,11 @@ files = {
},
f'/etc/php/{version}/cli/php.ini': {
'source': f'{version}/php.ini',
'content_type': 'mako',
'context': {
'num_cpus': node.metadata['vm']['cpu'],
'post_max_size': node.metadata['php'].get('post_max_size', 10),
'memory_limit': node.metadata.get('php/memory_limit', 256),
},
'needs': {
# "all php packages"