aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/service-uwsgi-config/templates/uwsgi.ini.j2
blob: 1095aa1fc60b06cf5686fc891cf56f45816b0378 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
[uwsgi]
add-header = Connection: close
buffer-size = 65535
{% if service_uwsgi_config_chunked_input_limit is defined %}
chunked-input-limit = {{ service_uwsgi_config_chunked_input_limit }}
{% endif %}
die-on-term = true
enable-threads = true
exit-on-reload = false
hook-master-start = unix_signal:15 gracefully_kill_them_all
{% if service_uwsgi_config_tls_backend | bool %}
https = {{ service_uwsgi_config_host }}:{{ service_uwsgi_config_http_port }},{{ service_uwsgi_config_tls_cert }},{{ service_uwsgi_config_tls_key }}
{% else %}
http = {{ service_uwsgi_config_host }}:{{ service_uwsgi_config_http_port }}
{% endif %}
http-auto-chunked = true
http-chunked-input = true
http-raw-body = true
lazy-apps = true
logto2 = /var/log/kolla/{{ service_uwsgi_config_log_dir }}/{{ service_uwsgi_config_log_file }}
{% if service_uwsgi_config_log_file_chmod is defined %}
logfile-chmod = {{ service_uwsgi_config_log_file_chmod }}
{% endif %}
{% if service_uwsgi_config_log_file_chown is defined %}
logfile-chown = {{ service_uwsgi_config_log_file_chown }}
{% endif %}
master = true
{% if service_uwsgi_config_module is defined %}
module = {{ service_uwsgi_config_module }}
{% elif service_uwsgi_config_wsgi_file is defined %}
wsgi-file = {{ service_uwsgi_config_wsgi_file }}
{% endif %}
plugins-dir = {{ '/usr/lib/uwsgi/plugins' if kolla_base_distro in ['ubuntu', 'debian'] else '/usr/lib64/uwsgi' }}
plugins = python3
processes = {{ service_uwsgi_config_workers }}
{% if service_uwsgi_config_threads is defined %}
threads = {{ service_uwsgi_config_threads }}
{% endif %}
{% if service_uwsgi_config_socket_port | length > 0 %}
socket = {{ service_uwsgi_config_host }}:{{ service_uwsgi_config_socket_port }}
{% endif %}
socket-timeout = 30
thunder-lock = true
{% if service_uwsgi_config_uid is defined %}
uid = {{ service_uwsgi_config_uid }}
{% endif %}
worker-reload-mercy = {{ service_uwsgi_config_worker_timeout }}
static-map = /static=/var/lib/kolla/venv/lib/python3/site-packages/static
{% for key, value in service_uwsgi_config_env.items() %}
env = {{ key }}={{ value }}
{% endfor %}