From 20ecdb80611349b58122d90e1fd0b52c07a51cce Mon Sep 17 00:00:00 2001 From: decentral1se Date: Thu, 16 Sep 2021 09:45:02 +0200 Subject: [PATCH] fix: log which compose files are being loaded See https://git.coopcloud.tech/coop-cloud/organising/issues/167. --- pkg/config/app.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/config/app.go b/pkg/config/app.go index 97f954e5..84fa7297 100644 --- a/pkg/config/app.go +++ b/pkg/config/app.go @@ -304,6 +304,7 @@ func GetAppStatuses(appFiles AppFiles) (map[string]string, error) { // merged into a composetypes.Config while respecting the COMPOSE_FILE env var. func GetAppComposeFiles(recipe string, appEnv AppEnv) ([]string, error) { 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 { @@ -314,6 +315,8 @@ func GetAppComposeFiles(recipe string, appEnv AppEnv) ([]string, error) { var composeFiles []string composeFileEnvVar := appEnv["COMPOSE_FILE"] + envVars := strings.Split(composeFileEnvVar, ":") + logrus.Debug("COMPOSE_FILE detected ('%s'), loading '%s'", composeFileEnvVar, envVars) for _, file := range strings.Split(composeFileEnvVar, ":") { path := fmt.Sprintf("%s/%s/%s", APPS_DIR, recipe, file) composeFiles = append(composeFiles, path)