Skip to content

Commit

Permalink
chore: only overwrite ports, wich have no default
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcStdt committed Sep 10, 2024
1 parent c4cf7ab commit 4917537
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/core/services/port_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4917537

Please sign in to comment.