I can't seem to figure out how to append to the default path in a supervisord program config.
I can reset the path:
environment=PATH="/home/site/environments/master/bin"
But when I try:
environment=PATH="/home/site/environments/master/bin:$PATH"
I see that supervisord doesn't evaluate $PATH
.
Google wasn't a big help on this for some reason, I cannot believe I'm the first person to need this.
Supervisord must have support for this, any idea what it is?
supervisord
don't run shell to preprocess variables in the config file, so you can't use shell expressions to expand variables. Although there is a patch that allows to do%($PATH)
and it was discussed in mailing lists back in 2011 but AFAIK it is still not included to the mainline source tree. As a workaround you can create a script that will setup environment and execute a command supplied in arguments. Then you just run the script from thesupervisord
likecommand /usr/local/bin/setup_env_master.sh program_name arguments
exec server --args
. You see it in upstart jobs invariably.