system variables are not visible to supervisor

强颜欢笑 提交于 2019-12-08 11:15:35

问题


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

来源:https://stackoverflow.com/questions/48165917/system-variables-are-not-visible-to-supervisor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!