Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 9b10b36

Browse files
authored
Merge pull request #90 from mnottale/deploy-orchestrator-env
deploy: Honor env DOCKER_ORCHESTRATOR.
2 parents 5d64fe9 + 04e2865 commit 9b10b36

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/deploy.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package cmd
22

33
import (
44
"fmt"
5+
"os"
56

67
"github.com/docker/cli/cli"
78
"github.com/docker/lunchbox/internal"
@@ -18,6 +19,9 @@ The app's docker-compose.yml is first rendered as per the render sub-command, an
1819
then deployed similarly to 'docker stack deploy'.`,
1920
Args: cli.RequiresMaxArgs(1),
2021
RunE: func(cmd *cobra.Command, args []string) error {
22+
if do, ok := os.LookupEnv("DOCKER_ORCHESTRATOR"); ok {
23+
deployOrchestrator = do
24+
}
2125
if deployOrchestrator != "swarm" && deployOrchestrator != "kubernetes" {
2226
return fmt.Errorf("orchestrator must be either 'swarm' or 'kubernetes'")
2327
}

0 commit comments

Comments
 (0)