Setting superisord environment variables

I am running the application from supervisord and I need to set up the environment for it. There are about 30 environment variables that need to be set. I tried to put everything on one big

Wednesday =

and that doesn't seem to work. I also tried a few lines of enviroment =, and that doesn't work either. I also tried both with and without "around the env value.

What is the best way to set up my environment so that it remains intact under the supervision of a supervisor? Should I call my actual program (tornado, fwiw) from a shell script with a predefined environment? Ideally, I would like to put all the environment variables in the include file and load them using the supervisor, but I am open to this in a different way.

UPDATE:

Here is what I use in the conf file:

environment=
    PYTHONPATH=/srv/obsf/current/:$PYTHONPATH,
    PYTHON_EGG_CACHE=/srv/obfs/current/.python-eggs,
    OBFS_API_ENVIRONMENT_STAGE=test,

30 . , , OBFS_API_ENVRIONMENT_STAGE .

+5
2

, . env . .

+4

relevant documentation section , /, :

/ KEY = val, KEY2 = val2, (, , ). % () s, , . , , , .

example for this section :

environment = KEY1=value1,KEY2=value2

parsed into a dict, python shlex lexer, . , , :

environment =
    KEY1="Some longer value containing whitespace",
    KEY2=value2-on-a-new-line,

, ; .

, KEY1, , ( , whitespace" {'KEY1': 'Some longer value containing whitespace', '=': ','} dict), . , .

+8

All Articles