mirror of
https://github.com/nikdoof/limetime.git
synced 2025-12-18 05:09:29 +00:00
Initial import of codebase
This commit is contained in:
35
puppet/templates/python/gunicorn.erb
Normal file
35
puppet/templates/python/gunicorn.erb
Normal file
@@ -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',
|
||||
),
|
||||
}
|
||||
Reference in New Issue
Block a user