Created
March 9, 2015 14:22
-
-
Save vperron/9db66663de0767ca046b to your computer and use it in GitHub Desktop.
roles/uwsgi/templates/upstart.uwsgi.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# simple uWSGI upstart job | |
description "uWsgi server for {{ application.name }}" | |
start on runlevel [2345] | |
stop on runlevel [06] | |
{% include "templates/env_vars.j2" %} | |
script | |
exec /usr/local/bin/uwsgi \ | |
--uid {{ application.user }} \ | |
--gid {{ application.group }} \ | |
--socket {{ uwsgi.socket }} \ | |
--harakiri {{ uwsgi.harakiri }} \ | |
--logto {{ application.log_dir }}/uwsgi.{{ application.name }}.log \ | |
--home {{ application.virtualenv_path }} \ | |
--pythonpath {{ application.path }} \ | |
--env DJANGO_SETTINGS_MODULE={{ django.settings }} \ | |
--module {{ django.wsgi }} \ | |
{% if uwsgi.gevent %} | |
--gevent {{ uwsgi.gevent }} \ | |
{% endif %} | |
--master \ | |
--processes {{ uwsgi.processes }} \ | |
--max-requests {{ uwsgi.max_requests }} \ | |
--enable-threads \ | |
--single-interpreter \ | |
--lazy-apps \ | |
-b {{ uwsgi.buffer_size }} \ | |
--file wsgi.py | |
end script | |
respawn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment