0

With regard to these posts:

Envs with supervisor, gunicorn & django,

How to guarantee availability of $BASH_ENV,

I'm trying to figure out why supervisor won't read my $BASH_ENV settings.

I am currently using a setup over which I load a gunicorn start up script through supervisor's config file.

I've set the supervisor's settings like this:

# /etc/supervisor/conf.d/test_project.conf

[program:test_project]
command=/home/konos5/gunicorn_start.sh
user=konos5
...

and the gunicorn script is this:

# /home/konos5/gunicorn_start.sh

#!/bin/bash
...
echo $TEST
...

So far so good. Both gunicorn and supervisor run fine. The problem is that $TEST comes out empty. Since supervisor loads the gunicorn script from a non-login, non-interactive shell it should source the file specified in $BASH_ENV.

Therefore I do this

$~ echo 'export TEST="HELLO WORLD"' > ~/my_custom_var
$~ export BASH_ENV=~/my_custom_var

The I reread and update supervisor and start again my project. However TEST still comes out empty. How is this possible since $BASH_ENV was supposed to be sourced?

Thank you in advance.

Community
  • 1
  • 1
stratis
  • 7,750
  • 13
  • 53
  • 94
  • what if you give full path instead of `~`? – fedorqui Feb 24 '15 at 13:34
  • @fedorqui Unfortunately it won't work either way. My best bet is that it must have something to do with the way supervisor works and the chain of inheritance. – stratis Feb 24 '15 at 13:38

0 Answers0