Преглед изворни кода

include services declared by `links` as implicit dependencies

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof пре 3 година
родитељ
комит
e766352d81
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      pkg/compose/create.go

+ 4 - 0
pkg/compose/create.go

@@ -173,6 +173,10 @@ func prepareServicesDependsOn(p *types.Project) error {
 			dependencies = append(dependencies, spec[0])
 		}
 
+		for _, link := range service.Links {
+			dependencies = append(dependencies, strings.Split(link, ":")[0])
+		}
+
 		if len(dependencies) == 0 {
 			continue
 		}