Skip to content

Commit

Permalink
Merge pull request #14 from jcchavezs/docker_compose
Browse files Browse the repository at this point in the history
fix: docker compose usage.
  • Loading branch information
jcchavezs authored Oct 29, 2024
2 parents 4b8e0d6 + 87158ca commit 5d3559f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ const (
func e2e(source e2eSource) error {
var err error

dockerComposeArgs := []string{"-f", "docker-compose.yml", "-f", "e2e/docker-compose.e2e.yml"}
dockerComposeArgs := []string{"compose", "-f", "docker-compose.yml", "-f", "e2e/docker-compose.e2e.yml"}

if err = sh.RunV("docker-compose", append(dockerComposeArgs, "up", "-d", "e2e_traefik_"+string(source))...); err != nil {
if err = sh.RunV("docker", append(dockerComposeArgs, "up", "-d", "e2e_traefik_"+string(source))...); err != nil {
return err
}
defer func() {
_ = sh.RunV("docker-compose", append(dockerComposeArgs, "down", "-v")...)
_ = sh.RunV("docker", append(dockerComposeArgs, "down", "-v")...)
}()

proxyHost := os.Getenv("TRAEFIK_HOST")
Expand All @@ -167,7 +167,7 @@ func e2e(source e2eSource) error {

if err = sh.RunV("go", "run", "github.com/corazawaf/coraza/v3/http/e2e/cmd/httpe2e@main", "--proxy-hostport",
"http://"+proxyHost, "--httpbin-hostport", "http://"+httpbinHost); err != nil {
sh.RunV("docker-compose", append(dockerComposeArgs, "logs", "traefik")...)
sh.RunV("docker", append(dockerComposeArgs, "logs", "traefik")...)
}

return err
Expand Down

0 comments on commit 5d3559f

Please sign in to comment.