Commit 59ca143c77a375d863ca085cfdfee7d15b589205

Authored by Rohan Rangray
1 parent 270ddae060
Exists in master

Fixed run_production to behave correctly with upstart

Showing 1 changed file with 3 additions and 3 deletions Inline Diff

scripts/run_production.sh View file @ 59ca143
#!/bin/bash -xe 1 1 #!/bin/bash -xe
source secrets.sh 2 2 source secrets.sh
source venv/bin/activate 3 3 source venv/bin/activate
# newrelic-admin run-program /srv/flashy-backend/venv/bin/gunicorn --pid /run/flashy/gunicorn.pid -w 6 -n flashy -b 127.0.0.1:7002 flashy.wsgi 4 4 # newrelic-admin run-program /srv/flashy-backend/venv/bin/gunicorn --pid /run/flashy/gunicorn.pid -w 6 -n flashy -b 127.0.0.1:7002 flashy.wsgi
uwsgi /etc/uwsgi/websocket.ini & 5 5 # Run the scripts with 'exec' so they're tracked by upstart properly
newrelic-admin run-program uwsgi /etc/uwsgi/flashy.ini 6 6 exec uwsgi /etc/uwsgi/websocket.ini &
trap 'kill $(jobs -pr)' SIGINT SIGTERM EXIT 7 7 exec newrelic-admin run-program uwsgi /etc/uwsgi/flashy.ini
8 8