I need to proxy multiple environment variables from /etc/environment
to a process managed by a supervisor
.
The following configuration worked for me with supervisor 3.0r1-1
but supervisor 3.2.0-2
reports an error:
environment=FOO=$FOO,BAR=$BAR,BAZ=$BAZ
Error: Unexpected end of key/value pairs in value…
Some answers suggest to quote the values but if I do so, the variables wouldn't be expanded to real values.
What am I doing wrong? How to fix it?
Best Answer
According to http://supervisord.org/configuration.html?highlight=environment, have you tried putting them all on one line?
(that is,
=
is used for bothenvironment
itself and for the key-value pairs, separated by commas, with the values bounded with quotation marks)Also, where does $FOO come from? http://supervisord.org/subprocess.html#subprocess-environment says 'No shell is executed by supervisord when it runs a subprocess' so its not clear how you expect $FOO to work.