Skip to content

Support env file - #665

Merged
bfirsh merged 1 commit into
docker:masterfrom
benlangfeld:support-env-file
Dec 9, 2014
Merged

bfirsh merged 1 commit into
docker:masterfrom
benlangfeld:support-env-file

Conversation

@benlangfeld

Copy link
Copy Markdown

Replaces #481 and #479 addressing the issues raised in those tickets.

@AnalogJ

AnalogJ commented Nov 23, 2014

Copy link
Copy Markdown

I would love to see this merged into fig. I know its only been a few days, but any eta on when that might happen? Environment management is a bit of a pain-point for me right now

@benlangfeld

Copy link
Copy Markdown
Author

I'd also obviously love to see this merged. Feedback for improvements is welcome and I'll get them done as fast as possible to make this merge-ready.

@cevaris

cevaris commented Nov 23, 2014

Copy link
Copy Markdown

+1

Comment thread fig/service.py Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using self.options here would mean that override_options is missed. I guess this doesn't technically break anything right now, but I don't think the way the -e param is implemented for fig run is correct, and this would make it harder to fix (it should be using override_options instead of setting service.options).

We may also want to add a command line arg for --env-file at some point.

Could you make this take a param of options instead? This would also have a nice side benefit that self would be unused, and the method could be moved off the class to just a module level helper.

@dnephin

dnephin commented Nov 23, 2014

Copy link
Copy Markdown

Thanks for the PR! I think this is looking good, I just left a few suggestions. A git squash on some of the commits would be good too, once it's all ready.

@benlangfeld

Copy link
Copy Markdown
Author

I'll address your suggestions tomorrow and then request another round of review :)

@benlangfeld

Copy link
Copy Markdown
Author

I think I've now resolved all of your suggestions. I'll leave the commits separate for one more round of review, then squash for merge later.

@mbleigh

mbleigh commented Nov 29, 2014

Copy link
Copy Markdown

👍 this would be great

@Jasperswaagman

Copy link
Copy Markdown

+1

@dnephin

dnephin commented Dec 2, 2014

Copy link
Copy Markdown

LGTM (with a squash)

@marksteve

Copy link
Copy Markdown

🎉

@benlangfeld

Copy link
Copy Markdown
Author

Rebased as requested. Merge-ready.

@dnephin dnephin added this to the 1.1.0 milestone Dec 3, 2014
@dnephin

dnephin commented Dec 3, 2014

Copy link
Copy Markdown

hmm, looks like the latest test run hit some errors, not sure if that was a problem on werkers end or what happened.

I've put this into the milestone for the next release.

@benlangfeld
benlangfeld force-pushed the support-env-file branch 2 times, most recently from 894dec9 to 8ffdbbe Compare December 3, 2014 13:39
@benlangfeld

Copy link
Copy Markdown
Author

Now this is ready :)

@benlangfeld

Copy link
Copy Markdown
Author

@dnephin Could we get this merged? It's being discussed as a failing of Fig over at moby/moby#9459 (comment).

@dnephin

dnephin commented Dec 5, 2014

Copy link
Copy Markdown

We need another LGTM from a fig maintainer. I believe they are busy with dockercon EU, so it may be a week or so.

@aanand @bfirsh when you have a minute

Comment thread docs/yml.md Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we could support the normal use case where it isn't an array? Should just be an isinstance(..., list) right?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

@bfirsh

bfirsh commented Dec 8, 2014

Copy link
Copy Markdown

Looks awesome, thanks @benlangfeld! Needs a rebase though.

@benlangfeld
benlangfeld force-pushed the support-env-file branch 2 times, most recently from 068b617 to 2fd5df9 Compare December 8, 2014 23:29
@benlangfeld

Copy link
Copy Markdown
Author

Rebased and ready for merge :)

@bfirsh

bfirsh commented Dec 9, 2014

Copy link
Copy Markdown

LGTM

bfirsh added a commit that referenced this pull request Dec 9, 2014
@bfirsh
bfirsh merged commit e794e79 into docker:master Dec 9, 2014
@bfirsh

bfirsh commented Dec 9, 2014

Copy link
Copy Markdown

Thanks @benlangfeld!

@marksteve

Copy link
Copy Markdown

🎉

@eudaimos

Copy link
Copy Markdown

Looking at the code, it appears as if env_file is only an option from fig.yml, is this correct?

I've been using the --env-file option to docker run to choose an environment file for "dev", "qa", "prod." Is it possible to extend this as an option to fig up and fig run which would make it act exactly like it does for docker run?

@benlangfeld

Copy link
Copy Markdown
Author

You are correct @eudaimos. It would be possible to add this as a command-line override as suggested by @dnephin here. Do you think you could add this?

@benlangfeld
benlangfeld deleted the support-env-file branch December 14, 2014 17:49
@eudaimos

Copy link
Copy Markdown

Ha, didn't see that part of the earlier comment. I can give it a try when I free up, but it would be hacky at best and take me a while to get to testing since I've never written anything in python before. @benlangfeld if there's someone else with python experience that wants to take it on before all of that happens, I'd be grateful.

@benlangfeld

Copy link
Copy Markdown
Author

I'm in precisely the same position as you @eudaimos. This is the first Python code I've ever written :)

@geowa4

geowa4 commented Dec 20, 2014

Copy link
Copy Markdown

Any idea when this will be delivered?

@abesto

abesto commented Jan 2, 2015

Copy link
Copy Markdown

Looking forward to this a lot. Any chance of a minor release soon?

@johanhaleby

Copy link
Copy Markdown

I'd also be really happy for this. This is a showstopper.

@petebrowne

Copy link
Copy Markdown

👍 Our team is waiting for this one as well.

@Starefossen

Copy link
Copy Markdown

+1 we are waiting on this too!

@dnephin

dnephin commented Feb 15, 2015

Copy link
Copy Markdown

This feature is available in the latest docker-compose RC releases https://github.com/docker/fig/releases

yuval-k pushed a commit to yuval-k/compose that referenced this pull request Apr 10, 2015
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.