From e400fce9d51bce4f43bb7a4aca704f2d44023dff Mon Sep 17 00:00:00 2001 From: heronimus Date: Tue, 16 Jan 2024 02:04:48 +0700 Subject: [PATCH] feat: update debug mode build using consolidated multistage dockerfile --- common/tea_cmd/docker.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/tea_cmd/docker.go b/common/tea_cmd/docker.go index 66f30f5..cfd8c55 100644 --- a/common/tea_cmd/docker.go +++ b/common/tea_cmd/docker.go @@ -27,13 +27,14 @@ func dockerCompose(args ...string) error { } func dockerComposeWithCfg(cfg config.Config, args ...string) error { - yml := "" + yml := path.Join(cfg.RootDir, "docker-compose.yml") + if !cfg.Debug { - yml = path.Join(cfg.RootDir, "docker-compose.yml") + args = append([]string{"compose", "-f", yml}, args...) } else { - yml = path.Join(cfg.RootDir, ".ide-debug/docker-compose.debug.yml") + ymlDebug := path.Join(cfg.RootDir, ".ide-debug/compose.debug.override.yml") + args = append([]string{"compose", "-f", yml, "-f", ymlDebug}, args...) } - args = append([]string{"compose", "-f", yml}, args...) cmd := exec.Command("docker", args...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr