mirror of https://github.com/docker/compose.git
Don't overwrite existing dependency condition
(when service has `volumes_from` another service with dependency condition) Signed-off-by: Laura Brehm <laurabrehm@hey.com>
This commit is contained in:
parent
43c444e890
commit
b564cc5a17
|
@ -125,7 +125,8 @@ func prepareVolumes(p *types.Project) error {
|
||||||
p.Services[i].DependsOn = make(types.DependsOnConfig, len(dependServices))
|
p.Services[i].DependsOn = make(types.DependsOnConfig, len(dependServices))
|
||||||
}
|
}
|
||||||
for _, service := range p.Services {
|
for _, service := range p.Services {
|
||||||
if utils.StringContains(dependServices, service.Name) {
|
if utils.StringContains(dependServices, service.Name) &&
|
||||||
|
p.Services[i].DependsOn[service.Name].Condition == "" {
|
||||||
p.Services[i].DependsOn[service.Name] = types.ServiceDependency{
|
p.Services[i].DependsOn[service.Name] = types.ServiceDependency{
|
||||||
Condition: types.ServiceConditionStarted,
|
Condition: types.ServiceConditionStarted,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue