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

Update config to match the latest conventions #929

Open
grossvogel opened this issue Mar 11, 2021 · 4 comments
Open

Update config to match the latest conventions #929

grossvogel opened this issue Mar 11, 2021 · 4 comments
Assignees
Labels

Comments

@grossvogel
Copy link
Contributor

Recent elixir versions use a config scheme that's easier to understand, with a clear separation between compile-time and runtime configutation: https://hexdocs.pm/mix/Mix.Tasks.Release.html#module-runtime-configuration

We should update the template to match this setup so onboarding engineers can find things where they expect and can rely on the latest elixir docs for guidance.

@ijadams ijadams self-assigned this May 10, 2021
@ijadams
Copy link
Contributor

ijadams commented May 10, 2021

Have some SLA time this week going to pick this up and bundle it into another PR if everyone is okay with that?

@ijadams
Copy link
Contributor

ijadams commented May 10, 2021

Also a candidate for @pjdiiori to pick up with his SLA shadow hours

@pjdiiori
Copy link

Is this just as simple as renaming "releases.exs" to "runtime.exs"?

I've found some examples that place all the configurations within a if config_env() == :prod do block but I don't see any mention of that in the documentation. Is that preferred/necessary?

@grossvogel
Copy link
Contributor Author

I just realized something about this:

  • releases.exs is only used for built releases
  • runtime.exs is evaluated at runtime for all environments meaning it includes test and dev as well

So we have to be careful here. We probably have some compile-time config for test and dev that we don't want to overwrite with environment variables even though we do want to use environment for those configs in prod.

Some resources:

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

No branches or pull requests

3 participants