Select Git revision
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
uwsgi.ini.j2 1.97 KiB
[uwsgi]
uwsgi-socket = /run/uwsgi/{{app.instance}}/{{app.instance}}.sock
#http = localhost:5000
chmod-socket = 660
chown-socket = {{app_user}}:www-data
autoload =
master =
workers = {{ app_workers|default(4) }}
prio = -5
harakiri = {{app_harakiri|default(30)}}
buffer-size=32768
cheaper = 1
cheaper-algo = spare
cheaper-overload = 1
cheaper-initial = 1
cheaper-step = 1
{% if app_enable_threads|default(false) %}
enable-threads =
single-interpreter = true
{% endif %}
{% for option in app_uwsgi_options|default([]) %}
{{option}}{% if "=" not in option %} ={% endif %}
{% endfor %}
{% for env in app_service_env %}
env = {{ env }}
{% endfor %}
{% for mule in range(app_mules|default(0)) %}
mule =
{% endfor %}
{% if app_spooler %}
spooler = {{app_spooler_dir}}
spooler-interval = {{app_spooler_interval}}
{% endif %}
#umask = 227
chdir = {{app_chdir}}
uid = {{app_user}}
gid = {{app_group}}
log-date =
log-4xx =
log-5xx =
log-x-forwarded-for =
{% if app_lang == "python" %}
{% if app_python_version == 2 %}
plugin = python27
{% elif app_python_version == 3 %}
{% if ansible_distribution_release == "stretch" %}
plugin = python35
{% elif ansible_distribution_release == "buster" %}
plugin = python37
{% elif ansible_distribution_release == "bullseye" %}
plugin = python39
{% endif %}
{% endif %}
{% if app_venv != '' %}
virtualenv = {{app_venv}}
{% endif %}
{% if app_module is defined and app_module != '' %}
{% if app_mountpoint != '/' and app_mountpoint != '' %}
mount={{app_mountpoint}}={{app_module}}
{% else %}
module = {{ app_module }}
{% endif %}
{% else %}
wsgi-file = {{app_path}}/{{app_program}}
callable = {{app_callable}}
pyargv = {{app_program}} {{app_command}}
mount={{app_mountpoint}}={{app_path}}/{{app_program}}
{% endif %}
{% elif app_lang == "ruby" %}
plugin = rack_ruby{{app_ruby_version|replace(".", "")}}
rack = {{app_rack}}
{% if app_gemfile is defined and app_gemfile != '' %}
env = BUNDLE_GEMFILE={{app_gemfile}}
rbrequire = bundler/setup
{% endif %}
{% endif %}
manage-script-name =