summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Modulefile2
-rw-r--r--templates/gunicorn.erb28
2 files changed, 15 insertions, 15 deletions
diff --git a/Modulefile b/Modulefile
index 82069d4..5806e9d 100644
--- a/Modulefile
+++ b/Modulefile
@@ -1,5 +1,5 @@
name 'stankevich-python'
-version '1.2.0'
+version '1.2.1'
author 'Sergey Stankevich'
license 'Apache License, Version 2.0'
diff --git a/templates/gunicorn.erb b/templates/gunicorn.erb
index 1a96531..99481e7 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 %>',
+ 'working_dir': '<%= @dir %>',
'user': 'www-data',
'group': 'www-data',
-<% if virtualenv -%>
- 'python': '<%= virtualenv %>/bin/python',
+<% 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 -%>
),