Dan Anglin
ce490db95d
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.
24 lines
409 B
Go
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:]...)
|
|
}
|