You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to set an environment variable in my supervisord config by using the value of an existing environment variable. The existing variable is REDIS_PORT_6379_TCP_ADDR (comes from a Docker linked container); the value is an IP address (e.g. 172.17.0.5). This was my first naive attempt:
$ supervisord -c /etc/supervisor/supervisord.conf -n
Error: Format string 'REDIS_URL="redis://%(ENV_REDIS_PORT_6379_TCP_ADDR):6379/0"' for 'environment' is badly formatted
For help, use /usr/bin/supervisord -h
Same result if I remove the double quotes:
$ supervisord -c /etc/supervisor/supervisord.conf -n
Error: Format string 'REDIS_URL=redis://%(ENV_REDIS_PORT_6379_TCP_ADDR):6379/0' for 'environment' is badly formatted
For help, use /usr/bin/supervisord -h
I've tried the same things by putting export into the command section:
$ supervisord -c /etc/supervisor/supervisord.conf -n
Error: Format string '"export REDIS_URL=redis://%(ENV_REDIS_PORT_6379_TCP_ADDR):6379/0; bundle exec sidekiq -c 50"' for 'command' is badly formatted
For help, use /usr/bin/supervisord -h
What am I doing wrong?
I'm on 3.0b2:
$supervisord --version
3.0b2
The text was updated successfully, but these errors were encountered:
I'm trying to set an environment variable in my supervisord config by using the value of an existing environment variable. The existing variable is
REDIS_PORT_6379_TCP_ADDR
(comes from a Docker linked container); the value is an IP address (e.g.172.17.0.5
). This was my first naive attempt:Which doesn't work at all as supervisord can't parse it:
Then I tried quoting the environment section:
That didn't work as the variable didn't get interpolated before being passed to my program:
Then, per this StackOverflow answer, I tried using the
%(ENV)
syntax:Once again it can't parse it:
Same result if I remove the double quotes:
I've tried the same things by putting
export
into thecommand
section:Result:
Result:
What am I doing wrong?
I'm on 3.0b2:
The text was updated successfully, but these errors were encountered: