I have three different projects, ProjectA depends on ProjectB, which in turn depends on ProjectC.
Assume you want to develop only ProjectC, so I want to use a setup with one container only at its runtime.
ProjectB needs ProjectC, so I have to define a docker-compose with two images.
ProjectA then again needs both ProjectB and ProjectC, so I fear I have to either duplicate a lot in the each docker-compose.yml
file the longer the dependency chain gets.
I know I can link external images in a docker-compose.yml, yet this means more manual setup, as I have to checkout each project and run docker-compose.yml in each of them.
Basically I wonder how I can manage a docker-compose setup for a microservice architecture.
For the lack of a better phrase: Can I extend docker-compose.yml files?
The next release (1.5.0) will support a way to extend a composition (see https://github.com/docker/compose/pull/2051). It is in master now if you want to try it out.
I think what you're describing is pretty close to this proposal https://github.com/docker/compose/issues/318
You can extend services in docker-compose.yml from another YAML file. Just use extends key in your docker-compose.yml.
For example:
projectC.yml
projectB.yml