Wednesday, November 30, 2011

Re: Process management with Supervisord

On Wed, Nov 30, 2011 at 9:35 AM, Andre Lopes <> wrote:
> Hi,
> I'm serving to production a Django website with Nginx + Gunicorn with
> virtualenv.
> My dumb question is: I must to install supervisord in my virtualenv or
> outside my virtualenv?

You should just install supervisord to your system python install
(easy_install). I run it as root manage it with upstart on Ubuntu so
it'll restart/start properly (run nginx workers and gunicorn as
non-root (servers) - this example is for uwsgi but it'll be very
similar for gunicorn):

# supervisord.conf
# put this directive at the bottom of your /etc/supervisord.conf

--pythonpath "/home/servers/www/"
--virtualenv "/home/servers/virtualenvs/example"
--module example.django_wsgi


# Upstart init
# copy or symlink to /etc/init/supervisord.conf
# /etc/init/supervisord.conf

# supervisord script for upstart

description "Supervisor"

start on runlevel [2345]
stop on runlevel [!2345]

# --nodaemon: Run supervisord in the foreground
exec /usr/local/bin/supervisord --nodaemon

You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment