diff --git a/pkg/config/app.go b/pkg/config/app.go index a9f22d758..9c07de0c6 100644 --- a/pkg/config/app.go +++ b/pkg/config/app.go @@ -334,17 +334,15 @@ func GetAppStatuses(appFiles AppFiles) (map[string]map[string]string, error) { // GetAppComposeFiles gets the list of compose files for an app which should be // merged into a composetypes.Config while respecting the COMPOSE_FILE env var. func GetAppComposeFiles(recipe string, appEnv AppEnv) ([]string, error) { + var composeFiles []string + if _, ok := appEnv["COMPOSE_FILE"]; !ok { - logrus.Debug("no COMPOSE_FILE detected, loading all compose files") - pattern := fmt.Sprintf("%s/%s/compose**yml", APPS_DIR, recipe) - composeFiles, err := filepath.Glob(pattern) - if err != nil { - return composeFiles, err - } + logrus.Debug("no COMPOSE_FILE detected, loading compose.yml") + path := fmt.Sprintf("%s/%s/compose.yml", APPS_DIR, recipe) + composeFiles = append (composeFiles, path) return composeFiles, nil } - var composeFiles []string composeFileEnvVar := appEnv["COMPOSE_FILE"] envVars := strings.Split(composeFileEnvVar, ":") logrus.Debugf("COMPOSE_FILE detected ('%s'), loading '%s'", composeFileEnvVar, strings.Join(envVars, ", "))