Skip to content

Commit

Permalink
fix: project env override
Browse files Browse the repository at this point in the history
Signed-off-by: Toma Puljak <[email protected]>
  • Loading branch information
Tpuljak committed Jun 14, 2024
1 parent b66701f commit 52b2983
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,6 @@ func (p DockerProvider) getClient(targetOptionsJson string) (docker.IDockerClien

// If the project is running locally, we override the env vars to use the host.docker.internal address
func (p DockerProvider) setLocalEnvOverride(project *workspace.Project) {
envOverride := workspace.GetProjectEnvVars(project, fmt.Sprintf("http://host.docker.internal:%d", *p.ApiPort), fmt.Sprintf("http://host.docker.internal:%d", *p.ServerPort))

for k := range project.EnvVars {
override, ok := envOverride[k]
if ok {
project.EnvVars[k] = override
}
}
project.EnvVars["DAYTONA_SERVER_URL"] = fmt.Sprintf("http://host.docker.internal:%d", *p.ServerPort)
project.EnvVars["DAYTONA_SERVER_API_URL"] = fmt.Sprintf("http://host.docker.internal:%d", *p.ApiPort)
}

0 comments on commit 52b2983

Please sign in to comment.