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]
|
||||
command = /home/app/virtualenv/bin/python2 /home/app/app/manage.py run_gunicorn --settings=herobrine.local_settings -w 2
|
||||
directory = /home/app/app
|
||||
command = /home/app/server.sh
|
||||
directory = /home/app
|
||||
user = app
|
||||
autostart = true
|
||||
autorestart = true
|
||||
|
|
|
@ -39,7 +39,10 @@ CONFIG_FILES = [
|
|||
'%s/config/production/app.supervisor.conf' % GIT_DOWNLOAD_DIR,
|
||||
'./conf/app.supervisor.conf'
|
||||
),
|
||||
|
||||
(
|
||||
'%s/config/production/server.sh' % GIT_DOWNLOAD_DIR,
|
||||
'./server.sh'
|
||||
),
|
||||
]
|
||||
|
||||
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