support docker compose run

This commit is contained in:
Matt Hook
2023-12-29 13:38:24 +13:00
committed by Chaim Lev-Ari
parent 69c06bc756
commit 2741972041
3 changed files with 51 additions and 0 deletions
+9
View File
@@ -6,6 +6,7 @@ import (
type Deployer interface {
Deploy(ctx context.Context, filePaths []string, options DeployOptions) error
Run(ctx context.Context, filePaths []string, serviceName string, options RunOptions) error
// Remove stops and removes containers
//
// projectName or filePaths are required
@@ -47,3 +48,11 @@ type DeployOptions struct {
// When this is set, docker compose will output its logs to stdout
AbortOnContainerExit bool ``
}
type RunOptions struct {
Options
// Automatically remove the container when it exits
Remove bool
// A list of arguments to pass to the container
Args []string
}