Thank you for the reply. Let's say I do this:

export SQLALCHEMY_DATABASE_URI=postgresql://test:test@localhost/test

Currently it seems flask can't read it like this:

SQLALCHEMY_DATABASE_URI = os.environ['SQLALCHEMY_DATABASE_URI']

I am starting UWSGI emperor using an Init.d script and then my app is running with emperor.

I hope this gives a bit more info.

James
-------- Original Message --------
Subject: Re: [uWSGI] Environmental variable in UWSGI
From: Łukasz_Mierzwa <[email protected]>
Date: Wed, March 19, 2014 2:45 am
To: uWSGI developers and users list <[email protected]>

You can set environment variables outside of app ini, but you must make sure that uWSGI is started in a way that reads those env variables. You might source file with env variables in init script, if you use some kind of supervisor tool that starts uWSGI you can set env variables there. There is no easy answer to this question, it depends how you start uWSGI. 

2014-03-19 9:42 GMT+01:00 <[email protected]>:

Thank you for the reply. I'm trying to avoid storing my actual password in more files that are needed, is it possible to make my flask application have access to the environmental variable without my having to store the actual value in the uwsgi config?

--
Łukasz Mierzwa

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to