title: Environment variables with Supervisor
body: <p>I've setup supervisor to run celeryd, celerycam and gunicorn as per <a href="http://apreche.net/complete-single-server-django-stack-tutorial/" rel="nofollow">this blogpost</a>. Everything ran smoothly at first. After the first restart, nothing started up. The logs I can see are of the form.</p>
  
  <blockquote>
    <p>Unknown command: 'run_gunicorn' </p>
    
    <p>Type 'manage.py help' for usage.</p>
  </blockquote>
  
  <p>I'm guessing this is because supervisor doesn't 'see' my environment variables like DJANGO_SETTINGS_MODULE, DB_HOST, etc. I put all of them in /etc/environment but it's of no use. Again, I tried putting them against <code>environment</code> tag in /etc/supervisor/supervisord.conf under <code>[supervisor]</code>. I'm getting the following error</p>
  
  <blockquote>
    <p>Starting supervisor: Error: Format string '\'DEBUG\'="False",
    \'DJANGO_SETTINGS_MODULE\'="project.settings.production",for
    'environment' is badly formatted</p>
  </blockquote>
  
  <p>My supervisord.conf has the following contents under [supervisord]</p>
  
  <pre><code>[supervisord]
  logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
  pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
  childlogdir=/var/log/supervisor            ; ('AUTO' child log dir, default $TEMP)
  
  ; the below section must remain in the config file for RPC
  ; (supervisorctl/web interface) to work, additional interfaces may be
  ; added by defining them in separate rpcinterface: sections
  environment = 'DEBUG'="False",'DJANGO_SETTINGS_MODULE'="project.settings.production",
  </code></pre>
  
  <p>[Update - Adding logs from celery, gunicorn, celerycam]</p>
  
  <p>Logs from celeryd_err.log</p>
  
  <blockquote>
    <p>ImportError: No module named debug_toolbar  </p>
    
    <p>ImportError: No module named debug_toolbar</p>
    
    <p>ImportError: No module named debug_toolbar  </p>
  </blockquote>
  
  <p>Logs from celerycam_err.log</p>
  
  <blockquote>
    <p>ImportError: No module named debug_toolbar</p>
    
    <p>ImportError: No module named debug_toolbar</p>
    
    <p>ImportError: No module named debug_toolbar  </p>
  </blockquote>
  
  <p>Logs from gunicorn_err.log</p>
  
  <blockquote>
    <p>Type 'manage.py help' for usage.</p>
    
    <p>Unknown command: 'run_gunicorn'</p>
    
    <p>Type 'manage.py help' for usage.</p>
    
    <p>Unknown command: 'run_gunicorn'</p>
    
    <p>Type 'manage.py help' for usage.</p>
    
    <p>Unknown command: 'run_gunicorn'</p>
  </blockquote>
  
  <p>Any suggestions to where I can get the solution? Thanks in advance for any help!</p>