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

Allow Garden to read variables from files #1093

Closed
baspetersdotjpeg opened this issue Aug 12, 2019 · 3 comments · Fixed by #1156
Closed

Allow Garden to read variables from files #1093

baspetersdotjpeg opened this issue Aug 12, 2019 · 3 comments · Fixed by #1156

Comments

@baspetersdotjpeg
Copy link
Contributor

docker-compose lets you specify an env_file to decouple variables from the main configuration. Would be handy to let Garden do the same and make it easier for users migrating from docker-compose to adopt.

@edvald
Copy link
Collaborator

edvald commented Aug 13, 2019

That's a good idea. One thing I'm wondering: Would we merge the variables from the file with the other variables under ${local.env.<key>} or have a separate key? I could lean either way tbh.

@baspetersdotjpeg
Copy link
Contributor Author

baspetersdotjpeg commented Aug 13, 2019

Perhaps we could merge by default, and optionally allow users to specify a different key? When merging under local.env, in case of duplicate keys, I feel variables set in a service's config should override those set in the env file.

Perhaps @mickeeyo could share his thoughts here?

@edvald
Copy link
Collaborator

edvald commented Aug 13, 2019

I'd like to avoid multiple layers of optionality if possible. Also, variables set in a service's config have nothing to do with the local.env key, doesn't flow in that direction, so there's nothing to consider there really.

So it's only a question of whether we merge env files into local.env or make e.g. a separate local.env-file (or even just env-file) template key. I'm sorta leaning towards the former but still not decided.

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

Successfully merging a pull request may close this issue.

3 participants