3

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

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
king
  • 41
  • 2
  • *"I already have APP_ENV, APP_DEBUG in the system variable"* – what does that mean exactly? – deceze Jan 09 '18 at 10:22
  • 2
    problem solved, seems that if you run supervisor as a service it will not load env variables... you need to run it standalone supervisord - c /etc/supervisor/supervisord.conf – king Jan 09 '18 at 11:03

0 Answers0