gradle-dcompose-plugin
gradle-dcompose-plugin copied to clipboard
Feature Request: Add support for composite build
Is there support for composite build planed, i.e. starting one container from a different build?
How would that be achieved? Are you talking about the composite builds from Gradle?
Yes, I mean the composite-build in gradle. At the moment I can use a composite-build, but I have to define all service dependencies as task dependencies. instead of
dcompose {
myService {
...
dependsOn myService2
}
}
I have to use
startMyServiceContainer dependesOn gradle.includedBuild('project2').task(':startMySerice2Container')
Also it is necessary to define an external network or otherwise every "startContainter" would kill the running containers.
Okay, so I'm guessing it could look something like this:
dcompose {
myService {
...
dependsOn = [ service(':project2:myService2') ]
}
substituteService(':project2:myService2') {
// use a fallback image from a remote repo if the service is not present in the current build
image = '...'
}
}
I'm afraid I don't have the time right now, to do the implementation. But I'd be happy to accept a PR for this :)