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
|
||||
directory = /home/app
|
||||
user = app
|
||||
stopsignal = QUIT
|
||||
autostart = true
|
||||
autorestart = true
|
||||
stdout_logfile = /var/log/supervisor/gunicorn.log
|
||||
|
|
|
@ -413,6 +413,19 @@ status = call(
|
|||
check_status(status)
|
||||
|
||||
# ================ 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("")
|
||||
success('Finished!')
|
||||
|
|
Loading…
Reference in New Issue