From 4917537a39d7cfec7ecde84a411448dea6df3b3b Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 10 Sep 2024 19:32:52 +0200 Subject: [PATCH] chore: only overwrite ports, wich have no default --- internal/core/services/port_service.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/core/services/port_service.go b/internal/core/services/port_service.go index 16805be..1141889 100644 --- a/internal/core/services/port_service.go +++ b/internal/core/services/port_service.go @@ -59,10 +59,12 @@ func (p *PortMonitor) SyncPortEnv(file *domain.File) []*domain.AugmentedPort { var augmentedPorts []*domain.AugmentedPort for _, port := range ports { + + //TODO: get rid of this and set this directly in scroll.yaml, when templating is implemented portEnvName := fmt.Sprintf("DRUID_PORT_%s", strings.ToUpper(port.Name)) envPort := os.Getenv(portEnvName) - if envPort != "" { + if envPort != "" && port.Port == 0 { portInt, err := strconv.Atoi(envPort) if err != nil { port.Port = portInt