forked from coop-cloud/abra
expose all env variables to the app container
This commit is contained in:
parent
667264b5bb
commit
da46996e6b
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue