summaryrefslogtreecommitdiff
path: root/templates/gunicorn.erb
diff options
context:
space:
mode:
authorVik Bhatti <vik@vikbhatti.com>2014-04-08 14:50:52 +0100
committerVik Bhatti <vik@vikbhatti.com>2014-04-08 14:50:52 +0100
commit8d9ea35a00f133083e752d199a1102b00827876f (patch)
treef86cad23c5c5f842442b15a905ea3c92262cf254 /templates/gunicorn.erb
parent275cd8672ac5a0144f4d96ba39f0db6705786fc4 (diff)
parentc3a5a8f338776255859d50f4b906642f540cb162 (diff)
Pulled from upstream
Diffstat (limited to 'templates/gunicorn.erb')
-rw-r--r--templates/gunicorn.erb32
1 files changed, 16 insertions, 16 deletions
diff --git a/templates/gunicorn.erb b/templates/gunicorn.erb
index 1a96531..10f81fa 100644
--- a/templates/gunicorn.erb
+++ b/templates/gunicorn.erb
@@ -1,36 +1,36 @@
CONFIG = {
-<% if mode == 'django' -%>
+<% if @mode == 'django' -%>
'mode': 'django',
<% else -%>
'mode': 'wsgi',
<% end -%>
-<% if virtualenv -%>
+<% if @virtualenv -%>
'environment': {
-<% if environment -%>
- 'ENVIRONMENT': '<%= environment %>',
+<% if @environment -%>
+ 'ENVIRONMENT': '<%= @environment %>',
<% end -%>
- 'PYTHONPATH': '<%= virtualenv %>'
+ 'PYTHONPATH': '<%= @virtualenv %>'
},
<% end -%>
- 'working_dir': '<%= dir %>',
- 'user': 'www-data',
- 'group': 'www-data',
-<% if virtualenv -%>
- 'python': '<%= virtualenv %>/bin/python',
+ 'working_dir': '<%= @dir %>',
+ 'user': '<%= @owner %>',
+ 'group': '<%= @group %>',
+<% 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',
+<% if !@virtualenv and !@bind -%>
+ '--bind=unix:/tmp/gunicorn-<%= @name %>.socket',
+<% elsif @virtualenv and !@bind -%>
+ '--bind=unix:<%= @virtualenv %>/<%= @name %>.socket',
<% else -%>
- '--bind=<%= bind %>',
+ '--bind=<%= @bind %>',
<% end -%>
'--workers=<%= @processorcount.to_i*2 %>',
'--timeout=30',
-<% if mode != 'django' -%>
+<% if @mode != 'django' -%>
'app:app',
<% end -%>
),