Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Allow config defaults to be sourced from ENV#314

Merged
hkalexling merged 5 commits intogetmango:devfrom
crainte:feature/default-env-vars
Jul 3, 2022
Merged

Allow config defaults to be sourced from ENV#314
hkalexling merged 5 commits intogetmango:devfrom
crainte:feature/default-env-vars

Conversation

@crainte
Copy link
Copy Markdown
Contributor

@crainte crainte commented Jun 15, 2022

I'm not sure if you're interested in this, but it made running Mango much easier on my local install.

This allows the default config to source values from ENV variables if they are set. With this change we don't have to modify the docker CMD or edit the config.yml and then relaunch.

@crainte crainte changed the base branch from master to dev June 15, 2022 17:02
This allows the default config to source values from ENV variables if
they are set. With this change we don't have to modify the docker CMD or
edit the config.yml and then relaunch.
@crainte crainte force-pushed the feature/default-env-vars branch 4 times, most recently from beb3714 to 8817f71 Compare June 19, 2022 19:08
@crainte crainte force-pushed the feature/default-env-vars branch from d6a3200 to d6c3a33 Compare June 27, 2022 14:28
crainte added 2 commits June 27, 2022 09:30
This allows the default config to source values from ENV variables if
they are set. With this change we don't have to modify the docker CMD or
edit the config.yml and then relaunch.
@crainte crainte force-pushed the feature/default-env-vars branch from d6c3a33 to f3eb62a Compare June 27, 2022 14:30
@hkalexling
Copy link
Copy Markdown
Member

Hey thanks for the PR! I like the idea, and I refactored it with macro to enforce DRY. Note that now the environment variable names are just upper-case version of the Crystal variable names, so you might want to change some of the keys if you are actively using the old implementation.

@hkalexling hkalexling enabled auto-merge July 3, 2022 07:36
@hkalexling hkalexling merged commit b6a1ad8 into getmango:dev Jul 3, 2022
@crainte crainte deleted the feature/default-env-vars branch July 3, 2022 21:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants