system variables are not visible to supervisor

2019-06-09 00:15发布

I have a docker container with supervisor that launch some php jobs. I need to pass env variable to the php job. However is not working.

I added: in [supervisor]

environment=APP_ENV="%(ENV_APP_ENV)s",APP_DEBUG="%(ENV_APP_DEBUG)s"

And when I try to launch supervisor I receive:

Starting supervisor: Error: Format string 'APP_ENV="%(ENV_APP_ENV)s",APP_DEBUG="%(ENV_APP_DEBUG)s"' for 'supervisord.environment' contains names ('ENV_APP_ENV') which cannot be expanded. Available names: ENV_LANG, ENV_LANGUAGE, ENV_LC_ADDRESS, ENV_LC_ALL, ENV_L C_COLLATE, ENV_LC_CTYPE, ENV_LC_IDENTIFICATION, ENV_LC_MEASUREMENT, ENV_LC_MESSAGES, ENV_LC_MONETARY, ENV_LC_NAME, ENV_LC_NUMERIC, ENV_LC_PAPER, ENV_LC_TELEPHONE, ENV_LC_TIME, ENV_PATH, ENV_PWD, ENV_TERM, here For help, use /usr/bin/supervisord -h

I already have APP_ENV, APP_DEBUG in the system variable, how can I fix it?

I already looked on this topic

0条回答
登录 后发表回答