services/internal/actions/stop.go
Dan Anglin ce490db95d
refactor: internal actions package
Migrate all 'action' code to the new internal actions package to reduce
the number of internal packages.

Migrate the Bundle type to a separate package to avoid circular
dependencies.

Refactor code around bundle definition and download for relevant
services.
2023-11-26 07:46:10 +00:00

24 lines
409 B
Go

package actions
import (
"flow/services/internal"
"fmt"
"os"
"github.com/magefile/mage/sh"
)
func Stop(dockerHost, environment, service string) error {
os.Setenv("DOCKER_HOST", dockerHost)
command := []string{
"docker",
"compose",
"--project-directory",
fmt.Sprintf("%s/%s/compose", internal.RootBuildDir, environment),
"stop",
service,
}
return sh.RunV(command[0], command[1:]...)
}