Commit 5dce065517df068686a50222f82bf595f1389667

Authored by Andrew Buss
Exists in master

Merge branch 'master' of git.ucsd.edu:110swag/flashy-backend

Showing 3 changed files Inline Diff

File was created 1 # mysite_uwsgi.ini file
2 [uwsgi]
3
4 # Django-related settings
5 # the base directory (full path)
6 chdir = /srv/flashy-backend
7 # Django's wsgi file
8 module = flashy.wsgi
9 # the virtualenv (full path)
10 home = /srv/flashy-backend/venv/
11
12 # process-related settings
13 # master
14 master = true
15 # maximum number of worker processes
16 processes = 10
17 # the socket (use the full path to be safe
18 socket = /run/flashy.sock
19 # ... with appropriate permissions - may be needed
20 # chmod-socket = 664
nginxconf/flashy.cards View file @ 5dce065
upstream backend_production { 1 1 upstream backend_production {
server localhost:7001; 2 2 server unix:///run/flashy.sock
3 # server localhost:7001;
} 3 4 }
4 5
server { 5 6 server {
server_name flashy.cards; 6 7 server_name flashy.cards;
listen 443 ssl; 7 8 listen 443 ssl;
location / { 8 9 location / {
root /srv/flashy.cards/; 9 10 root /srv/flashy.cards/;
} 10 11 }
11 12
location ^~ /static { 12 13 location ^~ /static {
root /srv/; 13 14 root /srv/;
access_log off; 14 15 access_log off;
expires 30d; 15 16 expires 30d;
} 16 17 }
17 18
location ^~ /app { 18 19 location ^~ /app {
alias /srv/flashy-frontend; 19 20 alias /srv/flashy-frontend;
} 20 21 }
21 22
location ~ /(api|admin|api-auth)/ { 22 23 location ~ /(api|admin|api-auth)/ {
proxy_pass http://backend_production; 23 24 proxy_pass http://backend_production;
proxy_redirect http://backend_production $scheme://flashy.cards; 24 25 proxy_redirect http://backend_production $scheme://flashy.cards;
proxy_set_header Host $host; 25 26 proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; 26 27 proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 27 28 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
} 28 29 }
29 30
location ^~ /jenkins { 30 31 location ^~ /jenkins {
proxy_pass http://localhost:8080; 31 32 proxy_pass http://localhost:8080;
proxy_redirect http://localhost:8080 $scheme://flashy.cards; 32 33 proxy_redirect http://localhost:8080 $scheme://flashy.cards;
proxy_set_header Host $host; 33 34 proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; 34 35 proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 35 36 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 90; 36 37 proxy_read_timeout 90;
} 37 38 }
ssl_certificate /etc/nginx/ssl/bundle.crt; 38 39 ssl_certificate /etc/nginx/ssl/bundle.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key; 39 40 ssl_certificate_key /etc/nginx/ssl/nginx.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 40 41 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS; 41 42 ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
ssl_prefer_server_ciphers on; 42 43 ssl_prefer_server_ciphers on;
keepalive_timeout 70; 43 44 keepalive_timeout 70;
ssl_session_cache shared:SSL:10m; 44 45 ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m; 45 46 ssl_session_timeout 10m;
add_header Strict-Transport-Security "max-age=259200"; 46 47 add_header Strict-Transport-Security "max-age=259200";
} 47 48 }
48 49
requirements.txt View file @ 5dce065
beautifulsoup4 1 1 beautifulsoup4
Django>=1.8 2 2 Django>=1.8
#django-websocket-redis==0.4.3 3 3 #django-websocket-redis==0.4.3
#gevent==1.0.1 4 4 #gevent==1.0.1
#greenlet==0.4.5 5 5 #greenlet==0.4.5
#redis==2.10.3 6 6 #redis==2.10.3
six==1.9.0 7 7 six==1.9.0
djangorestframework 8 8 djangorestframework
docutils 9 9 docutils
gunicorn 10 10 gunicorn
django-simple-email-confirmation 11 11 django-simple-email-confirmation
django-ses 12 12 django-ses
coverage 13 13 coverage
14 uwsgi