bundles/php: allow configuring of memory_limit and clear_env
This commit is contained in:
parent
2b06c77439
commit
376dba347f
3 changed files with 10 additions and 1 deletions
|
@ -21,3 +21,7 @@ pm.max_spare_servers=${num_cpus*2}
|
||||||
pm.min_spare_servers=${num_cpus}
|
pm.min_spare_servers=${num_cpus}
|
||||||
pm.process_idle_timeout=30s
|
pm.process_idle_timeout=30s
|
||||||
pm.max_requests=1024
|
pm.max_requests=1024
|
||||||
|
|
||||||
|
% if not clear_env:
|
||||||
|
clear_env=no
|
||||||
|
% endif
|
||||||
|
|
|
@ -14,7 +14,7 @@ expose_php = Off
|
||||||
|
|
||||||
max_execution_time = 30
|
max_execution_time = 30
|
||||||
max_input_time = 60
|
max_input_time = 60
|
||||||
memory_limit = 256M
|
memory_limit = ${memory_limit}M
|
||||||
|
|
||||||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
|
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||||
display_startup_errors = Off
|
display_startup_errors = Off
|
||||||
|
|
|
@ -6,6 +6,7 @@ files = {
|
||||||
'content_type': 'mako',
|
'content_type': 'mako',
|
||||||
'context': {
|
'context': {
|
||||||
'num_cpus': node.metadata['vm']['cpu'],
|
'num_cpus': node.metadata['vm']['cpu'],
|
||||||
|
'clear_env': node.metadata.get('php/clear_env', True),
|
||||||
},
|
},
|
||||||
'needs': {
|
'needs': {
|
||||||
# "all php packages"
|
# "all php packages"
|
||||||
|
@ -17,9 +18,11 @@ files = {
|
||||||
},
|
},
|
||||||
f'/etc/php/{version}/fpm/php.ini': {
|
f'/etc/php/{version}/fpm/php.ini': {
|
||||||
'source': f'{version}/php.ini',
|
'source': f'{version}/php.ini',
|
||||||
|
'content_type': 'mako',
|
||||||
'context': {
|
'context': {
|
||||||
'num_cpus': node.metadata['vm']['cpu'],
|
'num_cpus': node.metadata['vm']['cpu'],
|
||||||
'post_max_size': node.metadata['php'].get('post_max_size', 10),
|
'post_max_size': node.metadata['php'].get('post_max_size', 10),
|
||||||
|
'memory_limit': node.metadata.get('php/memory_limit', 256),
|
||||||
},
|
},
|
||||||
'needs': {
|
'needs': {
|
||||||
# "all php packages"
|
# "all php packages"
|
||||||
|
@ -31,9 +34,11 @@ files = {
|
||||||
},
|
},
|
||||||
f'/etc/php/{version}/cli/php.ini': {
|
f'/etc/php/{version}/cli/php.ini': {
|
||||||
'source': f'{version}/php.ini',
|
'source': f'{version}/php.ini',
|
||||||
|
'content_type': 'mako',
|
||||||
'context': {
|
'context': {
|
||||||
'num_cpus': node.metadata['vm']['cpu'],
|
'num_cpus': node.metadata['vm']['cpu'],
|
||||||
'post_max_size': node.metadata['php'].get('post_max_size', 10),
|
'post_max_size': node.metadata['php'].get('post_max_size', 10),
|
||||||
|
'memory_limit': node.metadata.get('php/memory_limit', 256),
|
||||||
},
|
},
|
||||||
'needs': {
|
'needs': {
|
||||||
# "all php packages"
|
# "all php packages"
|
||||||
|
|
Loading…
Reference in a new issue