Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should configuration be read from the environment? #568

Open
Changaco opened this issue Sep 9, 2016 · 6 comments
Open

Should configuration be read from the environment? #568

Changaco opened this issue Sep 9, 2016 · 6 comments

Comments

@Changaco
Copy link
Member

Changaco commented Sep 9, 2016

Once AspenWeb/aspen.py#24 is fixed, should Pando continue to read its configuration from the environment? Should it also fill Aspen's configuration from the env?

@chadwhitacre
Copy link
Contributor

Does Pando already? If not, I'm not sure we need to add it. Pando is intended to be used as a library, not a framework.

@Changaco
Copy link
Member Author

Changaco commented Sep 9, 2016

Pando currently reads its own configuration from the environment, but not Aspen's. I don't think it makes sense to keep it this way, we should read both or neither.

@Changaco
Copy link
Member Author

@whit537 So, do we drop environment variables entirely?

@chadwhitacre
Copy link
Contributor

chadwhitacre commented Sep 14, 2016

Yes. Pando and Aspen are libraries now, not CLIs (with the exception of python -m pando ... are we going to keep PORT and PANDO_HOST there, at least?).

@Changaco
Copy link
Member Author

Objections that come to mind:

  • there are libraries that use environment variables, it's not necessarily a bad practice
  • server admins may appreciate being able to tweak settings without touching the code

@chadwhitacre
Copy link
Contributor

server admins may appreciate being able to tweak settings without touching the code

If that's the case, then their developers should expose their own envvars, which they then pass through to the library, e.g., something like LIBERAPAY_WWW_ROOT instead of {PANDO,ASPEN}_WWW_ROOT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants