bundles/nginx: determine worker processes by cpu count by default

This commit is contained in:
Franzi 2020-08-30 10:32:29 +02:00
parent 768bad7b77
commit b24253a64b
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -17,12 +17,20 @@ defaults = {
},
},
'nginx': {
'worker_processes': 4,
'worker_connections': 1000,
'worker_connections': 768,
},
}
@metadata_reactor
def worker_processes(metadata):
return {
'nginx': {
'worker_processes': metadata.get('vm/cpu', 2),
},
}
@metadata_reactor
def letsencrypt(metadata):
if not node.has_bundle('letsencrypt'):