|
1 | 1 | CONFIG = { |
2 | | -<% if mode == 'django' -%> |
| 2 | +<% if @mode == 'django' -%> |
3 | 3 | 'mode': 'django', |
4 | 4 | <% else -%> |
5 | 5 | 'mode': 'wsgi', |
6 | 6 | <% end -%> |
7 | | -<% if virtualenv -%> |
| 7 | +<% if @virtualenv -%> |
8 | 8 | 'environment': { |
9 | | -<% if environment -%> |
10 | | - 'ENVIRONMENT': '<%= environment %>', |
| 9 | +<% if @environment -%> |
| 10 | + 'ENVIRONMENT': '<%= @environment %>', |
11 | 11 | <% end -%> |
12 | | - 'PYTHONPATH': '<%= virtualenv %>' |
| 12 | + 'PYTHONPATH': '<%= @virtualenv %>' |
13 | 13 | }, |
14 | 14 | <% end -%> |
15 | | - 'working_dir': '<%= dir %>', |
| 15 | + 'working_dir': '<%= @dir %>', |
16 | 16 | 'user': 'www-data', |
17 | 17 | 'group': 'www-data', |
18 | | -<% if virtualenv -%> |
19 | | - 'python': '<%= virtualenv %>/bin/python', |
| 18 | +<% if @virtualenv -%> |
| 19 | + 'python': '<%= @virtualenv %>/bin/python', |
20 | 20 | <% else -%> |
21 | 21 | 'python': '/usr/bin/python', |
22 | 22 | <% end -%> |
23 | 23 | 'args': ( |
24 | | -<% if !virtualenv and !bind -%> |
25 | | - '--bind=unix:/tmp/gunicorn-<%= name %>.socket', |
26 | | -<% elsif virtualenv and !bind -%> |
27 | | - '--bind=unix:<%= virtualenv %>/<%= name %>.socket', |
| 24 | +<% if !@virtualenv and !@bind -%> |
| 25 | + '--bind=unix:/tmp/gunicorn-<%= @name %>.socket', |
| 26 | +<% elsif @virtualenv and !@bind -%> |
| 27 | + '--bind=unix:<%= @virtualenv %>/<%= @name %>.socket', |
28 | 28 | <% else -%> |
29 | | - '--bind=<%= bind %>', |
| 29 | + '--bind=<%= @bind %>', |
30 | 30 | <% end -%> |
31 | 31 | '--workers=<%= @processorcount.to_i*2 %>', |
32 | 32 | '--timeout=30', |
33 | | -<% if mode != 'django' -%> |
| 33 | +<% if @mode != 'django' -%> |
34 | 34 | 'app:app', |
35 | 35 | <% end -%> |
36 | 36 | ), |
|
0 commit comments