feat: all cli options available as FASTAPI_<opt> *BREAKING* recently added PORT envvar#216
feat: all cli options available as FASTAPI_<opt> *BREAKING* recently added PORT envvar#216babs wants to merge 1 commit intofastapi:mainfrom
FASTAPI_<opt> *BREAKING* recently added PORT envvar#216Conversation
…y added `PORT` envvar Signed-off-by: Damien Degois <damien@degois.info>
|
hi @babs! thank you for the PR 😊 The reason why we went with For the other flags, I don't think it is worth adding environment variables. Also I'm working on adding support for specifying some of those flags in the |
|
in which contexte are you talking about hosting provider ? Considering containerization as said in the proposal (#151), ENV VARS are first class citizen and using a file is neither a standard nor easy to setup. I don't see any argument to not allow any cli option to be overridden. |
Just one example: https://docs.railway.com/guides/public-networking#port-variable, I'm sure there's others that do the same thing, in there you can do
I don't think adding all these environment variables add valuable benefits to users, when you can do: (and it is a bit different for hope this explanation clarifies your doubts :D |
As stated this is not suited for general container orchestration. [One example among others is the worker count being adjusted based on the environment provided by the orchestration system] I've proposed another MR taking advantage of both usage (#217) |
Add environment variable for all cli options and prefix them with
FASTAPI_Will break the recently added
PORTenvvarFeedback welcome, @patrick91 and @tiangolo