If you use emperor then every env variable available to emperor will be
available also to each vassal, unless you add --unenv option to those that
should not have this env variable. But I think it's possible to use
--worker-exec option in vassal config to execute wrapper script instead of
uwsgi binary, you could use it to export needed variables and then execute
uwsgi.


2014-03-19 10:59 GMT+01:00 <[email protected]>:

> 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
>
>


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

Reply via email to