don't overwrite exposed env variables
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
Moritz 2023-01-26 20:40:25 +01:00
parent 89a2c889a4
commit 1c9a931143
1 changed files with 6 additions and 3 deletions

View File

@ -454,9 +454,12 @@ func ExposeAllEnv(compose *composetypes.Config, appEnv AppEnv) {
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)
_, exists := service.Environment[k]
if !exists {
value := v
service.Environment[k] = &value
logrus.Debugf("Add Key: %s Value: %s", k, value)
}
}
}
}