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

Expand environment configurability #93

Open
dcramer opened this issue Mar 5, 2021 · 3 comments
Open

Expand environment configurability #93

dcramer opened this issue Mar 5, 2021 · 3 comments

Comments

@dcramer
Copy link
Contributor

dcramer commented Mar 5, 2021

Would love to be able to configure more basics via an environment variable, including:

  • Admins
  • Sentry DSN

This makes it fairly easy to deploy to Google Cloud Run / Kubernetes without ever managing a custom configuration file or custom docker image.

I will throw up a PR if yall are in favor. Will take a look at other relevant non-layout settings that might make sense as well.

@itsojon
Copy link
Collaborator

itsojon commented Mar 5, 2021

Thank you for bringing this up, @dcramer! This makes sense. It's not well-documented, but you can also currently configure the app with 2 environment variables instead of files:

Would using those environment variables work for you, or would you still prefer a different approach?

@dcramer
Copy link
Contributor Author

dcramer commented Mar 5, 2021

@itsojon we do use the first one, as well as DATABASE_URL, but TROTTO_CONFIG is a complex solution to configuration given you have to serialize a yaml file. My suggestion will be just to infer more defaults from standard env variables. Otherwise people have to setup a build process to convert the app.yml into the serialized version, which is fine, but more process = more problems.

@itsojon
Copy link
Collaborator

itsojon commented Mar 5, 2021

@dcramer that's fair. I'd welcome a PR to support more simple env var config. We can document these in the docs as "basic" config options and app.yml as "advanced". My only concern is the variety of configuration options could get confusing. Let's

  1. have the app.yml file or the TROTTO_CONFIG env var take precedence if they exist (that is, no other env vars will be used)
  2. log a warning if one of those is set AND any of the other env vars are set

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