diff --git a/pkg/config/app.go b/pkg/config/app.go index 17af55c4..b0d8b530 100644 --- a/pkg/config/app.go +++ b/pkg/config/app.go @@ -445,5 +445,21 @@ func GetAppComposeConfig(recipe string, opts stack.Deploy, appEnv AppEnv) (*comp logrus.Debugf("retrieved %s for %s", compose.Filename, recipe) + ExposeAllEnv(compose, appEnv) + return compose, nil } + +// expose all env variables to the app container +func ExposeAllEnv(compose *composetypes.Config, appEnv AppEnv) { + for _, service := range compose.Services { + if service.Name == "app" { + logrus.Debug("Add the following environment to the app service config:") + for k, v := range appEnv { + value := v + service.Environment[k] = &value + logrus.Debugf("Key: %s Value: %s", k, value) + } + } + } +}