Supervising virtualenv django app via supervisor

The documentation for the virtualenv activate script says that it only modifies the PATH environment variable, in which case you can do:

[program:diasporamas]
command=/var/www/django/bin/gunicorn_django
directory=/var/www/django/django_test
environment=PATH="/var/www/django/bin"
...

Since version 3.2 you can use variable expansion to preserve the existing PATH too:

[program:diasporamas]
command=/var/www/django/bin/gunicorn_django
directory=/var/www/django/django_test
environment=PATH="/var/www/django/bin:%(ENV_PATH)s"

Leave a Comment