You can set environment variables from the Supervisord config

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com, or follow me on Twitter.

I often tell clients to consolidate their config files, from all their various apps, inside of a folder inside of /etc (I assume Linux servers).

But an interesting alternative is to set the config in the Supervisord config, and thus consolidate all logging and config info in one place.

[program:django]
environment = 
    SITE=domain1,
    DJANGO_SETTINGS_MODULE=foo.settings.local,
    DB_USER=foo,
    DB_PASS=bar
command = python manage.py command

One could simply have different entries for development, certain branches, and also the production service.

Post external references

  1. 1
    https://stackoverflow.com/questions/17055951/how-to-set-environment-variables-in-supervisor-service?rq=1
Source