diff options
author | kwadronaut <kwadronaut@leap.se> | 2014-07-29 19:08:36 +0200 |
---|---|---|
committer | kwadronaut <kwadronaut@leap.se> | 2014-07-29 19:08:36 +0200 |
commit | ba32e368e22078cac65d27531a1cf7d0962ec984 (patch) | |
tree | d28ae4bd79d5d4f61ecf3d8b8cd55c9e306b960d /templates | |
parent | 78c4e8d748138833ba07b71bcfc1ea538c4a2dfb (diff) | |
parent | 1696203589b66cc374bd8f5f21e82d5b92eb391b (diff) |
Diffstat (limited to 'templates')
-rw-r--r-- | templates/gunicorn.erb | 32 |
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 -%> ), |