Added deployment information for production site
This commit is contained in:
34
deploy/production/nginx.conf
Normal file
34
deploy/production/nginx.conf
Normal file
@@ -0,0 +1,34 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name mayan.crossculturalconsult.com www.mayan.crossculturalconsult.com;
|
||||
|
||||
access_log /var/log/nginx/mayan.crossculturalconsult.com.access.log;
|
||||
error_log /var/log/nginx/mayan.crossculturalconsult.com.error.log;
|
||||
root /home/mayan/production/;
|
||||
|
||||
location /static/ {
|
||||
alias /home/mayan/production/static_collected/;
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
alias /home/mayan/production/media/;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
alias /home/mayan/production/media/favicon.ico;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
alias /home/mayan/production/media/robots.txt;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8731;
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
client_max_body_size 10m;
|
||||
}
|
||||
allow all;
|
||||
}
|
||||
10
deploy/production/service_demon.sh
Executable file
10
deploy/production/service_demon.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
# Run the gunicorn service
|
||||
|
||||
# Make sure we're in the right virtual env and location
|
||||
source /home/mayan/.virtualenvs/production/bin/activate
|
||||
source /home/mayan/.virtualenvs/production/bin/postactivate
|
||||
|
||||
cd /home/mayan/production
|
||||
|
||||
exec gunicorn -c /home/mayan/production/deploy/gunicorn.conf.py mayan.wsgi:application
|
||||
10
deploy/production/upstart.conf
Normal file
10
deploy/production/upstart.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
start on started rc
|
||||
stop on stopped rc
|
||||
|
||||
respawn
|
||||
respawn limit 3 5
|
||||
|
||||
setuid mayan
|
||||
setgid mayan
|
||||
|
||||
exec /home/mayan/production/deploy/production/service_demon.sh
|
||||
Reference in New Issue
Block a user