Start Django-Supervisor From Upstart in Uwsgi script?

205 Views Asked by At

using Django-supervisor(https://github.com/rfk/django-supervisor), I am trying to figure out a way to have python myproject/manage.py supervisor --daemonize start when my uwsgi upstart script starts Django.

Here is my uwsgi script:

root@community:/etc/init# cat uwsgi.conf

#This version is for Community Service

description "uwsgi tiny instance"

start on runlevel [2345]
stop on runlevel [06]

exec uwsgi --die-on-term --ini /home/community/uwsgi/community_forums.ini

Could I just add a extra exec line? Or what would be the best way to do this?

1

There are 1 best solutions below

0
On

Create a new upstart job and have it start on started uwsgi, and stop on stopping uwsgi. Remove the --daemonize option from your django-supervisor line and make that your exec.