Added supervisor/gunicorn handlers on deploy script.
This commit is contained in:
parent
d3063e861a
commit
3bac8469c0
|
@ -2,6 +2,7 @@
|
||||||
command = /home/app/server.sh
|
command = /home/app/server.sh
|
||||||
directory = /home/app
|
directory = /home/app
|
||||||
user = app
|
user = app
|
||||||
|
stopsignal = QUIT
|
||||||
autostart = true
|
autostart = true
|
||||||
autorestart = true
|
autorestart = true
|
||||||
stdout_logfile = /var/log/supervisor/gunicorn.log
|
stdout_logfile = /var/log/supervisor/gunicorn.log
|
||||||
|
|
|
@ -413,6 +413,19 @@ status = call(
|
||||||
check_status(status)
|
check_status(status)
|
||||||
|
|
||||||
# ================ SERVER =======================
|
# ================ SERVER =======================
|
||||||
|
title('Server')
|
||||||
|
sub('Killing all gunicorn_django instances')
|
||||||
|
status = call(['killall', 'gunicorn_django'],
|
||||||
|
stdout=open(os.devnull, 'wb'),
|
||||||
|
stderr=open(os.devnull, 'wb'))
|
||||||
|
check_status(status)
|
||||||
|
|
||||||
|
sub('Restarting with supervisor')
|
||||||
|
status = call(['sudo', 'supervisorctl', 'restart', 'gunicorn'],
|
||||||
|
stdout=open(os.devnull, 'wb'),
|
||||||
|
stderr=open(os.devnull, 'wb'))
|
||||||
|
check_status(status)
|
||||||
|
|
||||||
|
|
||||||
print("")
|
print("")
|
||||||
success('Finished!')
|
success('Finished!')
|
||||||
|
|
Loading…
Reference in New Issue