Skip to content

Commit

Permalink
fix(cli): fix TRACETEST_DEV in docker compose installer (#2394)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeepc committed Apr 14, 2023
1 parent fa45a49 commit 9c41bdc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cli/analytics/analytics.go
@@ -1,10 +1,11 @@
package analytics

import (
"os"

"github.com/denisbrodbeck/machineid"
"github.com/kubeshop/tracetest/cli/config"
segment "github.com/segmentio/analytics-go/v3"
"os"
)

var (
Expand Down
5 changes: 4 additions & 1 deletion cli/installer/docker_compose.go
Expand Up @@ -71,7 +71,7 @@ func dockerComposeInstaller(config configuration, ui cliUI.UI) {
dockerComposeFName := filepath.Join(dir, dockerComposeFilename)

dockerCmd := fmt.Sprintf(
"docker compose -f %s up -d",
"docker compose -f %s up -d",
dockerComposeFName,
)

Expand Down Expand Up @@ -130,6 +130,7 @@ func getDockerComposeFileContents(ui cliUI.UI, config configuration) []byte {

sout := fixPortConfig(string(output))
sout = strings.ReplaceAll(sout, "$", "$$")
sout = strings.ReplaceAll(sout, "$${TRACETEST_DEV}", "${TRACETEST_DEV}")

return []byte(sout)
}
Expand Down Expand Up @@ -259,6 +260,8 @@ func fixTracetestContainer(config configuration, project *types.Project, version
tts.Image = "kubeshop/tracetest:" + version
tts.Build = nil
tts.Volumes[0].Source = tracetestConfigFilename
tracetestDevEnv := "${TRACETEST_DEV}"
tts.Environment["TRACETEST_DEV"] = &tracetestDevEnv

replaceService(project, serviceName, tts)

Expand Down

0 comments on commit 9c41bdc

Please sign in to comment.