startup.sh 350 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

# Create socket for Gunicorn
touch /var/www/wsm.rest/wsm.rest.sock 
chown www-data:www-data /var/www/wsm.rest/wsm.rest.sock

# Launch Gunicorn
exec /usr/local/bin/gunicorn wsgi:app \ 
	--workers 3 \
	--bind unix:wsm.rest.sock \ 
	-m 007 

# Remove default site from nginx
rm /etc/nginx/sites-enabled/default

# Launch neginx
exec nginx