Finished server configuration with a bash script to start gunicorn monitored by supervisor
This commit is contained in:
parent
df77cac478
commit
fea572bd83
|
@ -1,6 +1,6 @@
|
||||||
[program:gunicorn]
|
[program:gunicorn]
|
||||||
command = /home/app/virtualenv/bin/python2 /home/app/app/manage.py run_gunicorn --settings=herobrine.local_settings -w 2
|
command = /home/app/server.sh
|
||||||
directory = /home/app/app
|
directory = /home/app
|
||||||
user = app
|
user = app
|
||||||
autostart = true
|
autostart = true
|
||||||
autorestart = true
|
autorestart = true
|
||||||
|
|
|
@ -39,7 +39,10 @@ CONFIG_FILES = [
|
||||||
'%s/config/production/app.supervisor.conf' % GIT_DOWNLOAD_DIR,
|
'%s/config/production/app.supervisor.conf' % GIT_DOWNLOAD_DIR,
|
||||||
'./conf/app.supervisor.conf'
|
'./conf/app.supervisor.conf'
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
'%s/config/production/server.sh' % GIT_DOWNLOAD_DIR,
|
||||||
|
'./server.sh'
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
FIXTURES = [
|
FIXTURES = [
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# CONFIG
|
||||||
|
WORKERS=2
|
||||||
|
SETTINGS="herobrine.local_settings"
|
||||||
|
|
||||||
|
# Get environment resources
|
||||||
|
source .bash_profile
|
||||||
|
source virtualenv/bin/activate
|
||||||
|
|
||||||
|
# Start
|
||||||
|
gunicorn_django app --settings=$SETTINGS -w $WORKERS
|
Loading…
Reference in New Issue