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

Catch 22 with external_links mutual dependency #978

Closed
zeevallin opened this issue Feb 17, 2015 · 7 comments
Closed

Catch 22 with external_links mutual dependency #978

zeevallin opened this issue Feb 17, 2015 · 7 comments

Comments

@zeevallin
Copy link

As it turns out, when you got two or more projects that want to communicate with each other, docker-compose support is lacking. Starting up project_a requires me to have project_b running and vice versa.

# project_a/docker-compose.yml
app:
  external_links: projectb_app:b
# project_b/docker-compose.yml
app:
  external_links: projecta_app:a

For now I can circumvent this by running an ambassador proxy but it makes me wonder if this is something that should be solved by tooling in docker-compose. I'd love to hear your ideas.

Currently this increases developer sadness quota by 42%

sadness 42%

@dnephin
Copy link

dnephin commented Feb 17, 2015

I am pretty sure this is a limitation of docker links, they can't be circular.

@zeevallin
Copy link
Author

@dnephin Yeah, that's what I've gathered reading through documentation. It brings up a good question though. What is the preferred way of dealing with circular dependency?

@dnephin
Copy link

dnephin commented Feb 17, 2015

I think avoiding them is always nice, but if that's not an option, I've been suggesting you can use a dns service as part of your compose setup (since links are really just an easy way of doing dns).

There seem to be a lot of options for this:

I haven't had a chance to use any of these myself yet, but I would like to get around to it.

@aviau
Copy link
Contributor

aviau commented Jul 9, 2015

Currently this increases developer sadness quota by 42%

I can confirm that I feel the sadness.

Any updates on this?

@zeevallin
Copy link
Author

@aviau As far as I've understood, this type of thing is fundamentally not compatible with how docker works.

@dnephin
Copy link

dnephin commented Jul 10, 2015

I believe the new docker networking will allow circular "links" to exist. You can follow #1676 for the compose side of things.

@zeevallin
Copy link
Author

@dnephin Cheers.

@dnephin dnephin closed this as completed Aug 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants