0

I have added some new environment variables to my virtualenv. Added:

export BROKER_URL='amqp://guest:guest@localhost/prod'

to my bin/activate file.

But reloading uswgi does not make the new variables show up in my django app where I try and get it with:

BROKER_URL = os.environ.get('BROKER_URL')
Christoffer
  • 7,436
  • 4
  • 40
  • 42

1 Answers1

0

The problem is that uwsgi does not pick up variables in the activate file. Guess it is not using it when run by supervisor

Solution is to add the environment variable to the uwsgi ini file like so:

env = BROKER_URL=amqp://guest:guest@localhost/prod
Christoffer
  • 7,436
  • 4
  • 40
  • 42