Skip to content

Commit 0bc499b

Browse files
zwarediegorusso
authored andcommitted
Add basic configs for nginx and supervisor.
Also removes everything we won't be using from speed_python/deploy
1 parent 54c34a3 commit 0bc499b

9 files changed

Lines changed: 37 additions & 239 deletions

speed_python/deploy/apache-reverseproxy.conf

Lines changed: 0 additions & 30 deletions
This file was deleted.

speed_python/deploy/apache-speedcenter.conf

Lines changed: 0 additions & 15 deletions
This file was deleted.

speed_python/deploy/apache-speedcenter2.conf

Lines changed: 0 additions & 28 deletions
This file was deleted.

speed_python/deploy/django.wsgi

Lines changed: 0 additions & 23 deletions
This file was deleted.

speed_python/deploy/lighttpd-speedcenter.conf

Lines changed: 0 additions & 33 deletions
This file was deleted.

speed_python/deploy/nginx.conf

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
upstream app_server_speedcenter {
3+
server localhost:8000 fail_timeout=0;
4+
}
5+
6+
server {
7+
8+
listen 80; ## listen for ipv4
9+
listen [::]:88 default ipv6only=on; ## listen for ipv6
10+
11+
server_name localhost;
12+
13+
access_log /var/log/nginx/localhost.access.log;
14+
15+
# path for static files
16+
location ~ ^/static/(.*)$ {
17+
alias /home/vagrant/speed_python/speed_python/sitestatic/$1;
18+
}
19+
20+
location / {
21+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
22+
proxy_set_header Host $http_host;
23+
proxy_redirect off;
24+
25+
if (!-f $request_filename) {
26+
proxy_pass http://app_server_speedcenter;
27+
break;
28+
}
29+
}
30+
}

speed_python/deploy/nginx.default-site.conf

Lines changed: 0 additions & 103 deletions
This file was deleted.

speed_python/deploy/supervisor-speedcenter.conf

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[program:codespeed]
2+
command=/usr/bin/gunicorn_django /home/vagrant/speed_python/speed_python/settings.py
3+
directory=/home/vagrant/speed_python/
4+
user=www-data
5+
autostart=true
6+
autorestart=true
7+
redirect_stderr=True

0 commit comments

Comments
 (0)