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

Commit 5cfa9b7

Browse files
authored
Merge pull request #88 from mnottale/deploy-fix-namespace
deploy: Fill project name from app name.
2 parents d04f13e + 517a2bb commit 5cfa9b7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

renderer/deploy.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/docker/cli/cli/command/stack/options"
1010
"github.com/docker/cli/cli/command/stack/swarm"
1111
cliflags "github.com/docker/cli/cli/flags"
12+
"github.com/docker/lunchbox/utils"
1213
)
1314

1415
// Deploy deploys this app, merging in settings files, other compose files, end env
@@ -26,7 +27,9 @@ func Deploy(appname string, composeFiles []string, settingsFile []string, env ma
2627
})
2728
if orchestrator == "swarm" {
2829
ctx := context.Background()
29-
return swarm.DeployCompose(ctx, cli, rendered, options.Deploy{})
30+
return swarm.DeployCompose(ctx, cli, rendered, options.Deploy{
31+
Namespace: utils.AppNameFromDir(appname),
32+
})
3033
}
3134
// kube mode
3235
kubeCli, err := kubernetes.WrapCli(cli, kubernetes.Options{

0 commit comments

Comments
 (0)