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

Runtime config improvements + add support for a .env #1137

Closed
wants to merge 12 commits into from

Conversation

joshk
Copy link
Collaborator

@joshk joshk commented Dec 8, 2023

Adding the Dotenvy improves the development and deployment experience.

You can specify any environment variable used in runtime.exs in a local (and .gitignored) .env file, allowing for easy dev environment customizations. Or you can use this in production for configuring the production runtime.

One notable change is that I have removed

if System.get_env("RELEASE_MODE") do
sync_nodes_optional =
case System.fetch_env("SYNC_NODES_OPTIONAL") do
{:ok, sync_nodes_optional} ->
sync_nodes_optional
|> String.split(" ", trim: true)
|> Enum.map(&String.to_atom/1)
:error ->
[]
end
config :kernel,
sync_nodes_optional: sync_nodes_optional,
sync_nodes_timeout: 5000,
inet_dist_listen_min: 9100,
inet_dist_listen_max: 9155
end
as using sys.config should be the preference. See:

This can be added to the release before starting the application.

@joshk joshk marked this pull request as ready for review December 8, 2023 20:14
@joshk
Copy link
Collaborator Author

joshk commented Dec 24, 2023

Closing this for the time being

@joshk joshk closed this Dec 24, 2023
@joshk joshk mentioned this pull request Dec 24, 2023
@joshk joshk deleted the runtime-config-tweaks branch December 29, 2023 22:44
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

Successfully merging this pull request may close these issues.

1 participant