title: supervisor program:x command expansion of environment variables $(ENV_VAR)s?
body: <p>I would like to put configuration (in this case, site name) into supervisor
  environment variables, for expansion in program:x command arguments. Is this supported? The documentation's wording would seem to indicate yes.</p>
  
  <p>The following syntax is not working for me on supervisor-3.0 (excerpt of config file):</p>
  
  <pre><code>[supervisord]
  environment = SITE="mysite"
  
  [program:service_name]
  command=/path/to/myprog/myservice /data/myprog/%(ENV_SITE)s/%(ENV_SITE)s.db %(program_name)s_%(process_num)03d
  process_name=%(program_name)s_%(process_num)03d
  numprocs=5
  numprocs_start=1
  </code></pre>
  
  <p>Raises the following error:</p>
  
  <pre><code>sudo supervisord -c supervisord.conf                                            
  
  Error: Format string
  '/path/to/myprog/myservice /data/myprog/%(ENV_SITE)s/%(ENV_SITE)s.db %(program_name)s_%(process_num)03d'
  for 'command' contains names which cannot be expanded
  </code></pre>
  
  <p>Reading the documentation, I expected environment variables to be available for
  expansion in program:x command as %(ENV_VAR)s:</p>
  
  <p><a href="http://supervisord.org/configuration.html#program-x-section-values">http://supervisord.org/configuration.html#program-x-section-values</a></p>
  
  <p>command:</p>
  
  <p>"String expressions are evaluated against a dictionary containing the keys
  group_name, host_node_name, process_num, program_name, here (the directory of
  the supervisord config file), and all supervisord's environment variables
  prefixed with ENV_."</p>
  
  <p>Introduced: 3.0</p>
  
  <p>Related:</p>
  
  <p>There are open pull requests to enable expansion in additional section values:</p>
  
  <p><a href="https://github.com/Supervisor/supervisor/issues?labels=expansions&amp;page=1&amp;state=open">https://github.com/Supervisor/supervisor/issues?labels=expansions&amp;page=1&amp;state=open</a></p>
  
  <p>A search of goole (or SO) returns no examples of attempts to use %(ENV_VAR)s
  expansion in the command section value:</p>
  
  <p><a href="https://www.google.com/search?q=supervisord+environment+expansion+in+command">https://www.google.com/search?q=supervisord+environment+expansion+in+command</a></p>