mirror of
https://github.com/nikdoof/vapemap.git
synced 2025-12-22 22:29:26 +00:00
Vagrant Support
Brings in the basic config for Vagrant, missing elasticsearch but its enough to bring up a Vagrant instance of the main web app.
This commit is contained in:
23
puppet/templates/nginx/gunicorn.erb
Normal file
23
puppet/templates/nginx/gunicorn.erb
Normal file
@@ -0,0 +1,23 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name <%= @host %>;
|
||||
server_name_in_redirect off;
|
||||
|
||||
<% if @static %>
|
||||
location /static {
|
||||
alias <%= @static %>;
|
||||
}
|
||||
<% end %>
|
||||
|
||||
location / {
|
||||
proxy_pass_header Server;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_connect_timeout 10;
|
||||
proxy_read_timeout 3600;
|
||||
proxy_pass http://127.0.0.1:<%= @port %>/;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
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',
|
||||
),
|
||||
}
|
||||
7
puppet/templates/supervisor/program.erb
Normal file
7
puppet/templates/supervisor/program.erb
Normal file
@@ -0,0 +1,7 @@
|
||||
[program:<%= @title %>]
|
||||
command=<%= @command %>
|
||||
directory=<%= @directory %>
|
||||
user=<%= @user %>
|
||||
autostart=<%= @autostart %>
|
||||
autorestart=<%= @autorestart %>
|
||||
redirect_stderr=<%= @redirect_stderr %>
|
||||
Reference in New Issue
Block a user