From ed137893babebabdfdb5adf44d1a52272093ce8b Mon Sep 17 00:00:00 2001 From: Sergey Stankevich Date: Sun, 9 Sep 2012 18:36:30 -0400 Subject: Initial import --- templates/gunicorn.erb | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 templates/gunicorn.erb (limited to 'templates') diff --git a/templates/gunicorn.erb b/templates/gunicorn.erb new file mode 100644 index 0000000..2cf3eed --- /dev/null +++ b/templates/gunicorn.erb @@ -0,0 +1,35 @@ +CONFIG = { +<% if mode == 'django' -%> + 'mode': 'django', +<% else -%> + 'mode': 'wsgi', +<% end -%> +<% if virtualenv -%> + 'environment': { +<% if environment -%> + 'ENVIRONMENT': '<%= environment %>', +<% end -%> + 'PYTHONPATH': '<%= virtualenv %>' + }, +<% end -%> + 'working_dir': '<%= dir %>', + 'user': 'www-data', + 'group': 'www-data', +<% if virtualenv -%> + 'python': '<%= virtualenv %>/bin/python', +<% else -%> + 'python': '/usr/bin/python', +<% end -%> + 'args': ( +<% if !virtualenv and !bind -%> + '--bind=unix:/tmp/gunicorn-<%= name %>.socket', +<% elsif virtualenv and !bind -%> + '--bind=unix:<%= virtualenv %>/<%= name %>.socket', +<% else -%> + '--bind=<%= bind %>', +<% end -%> + '--workers=<%= @processorcount.to_i*2 %>', + '--timeout=30', + 'app:app', + ), +} -- cgit v1.2.3