Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.

Commit 59e6a97

Browse files
author
sunportainer
committed
fix(stack) redeploy not work issue
1 parent 6c2d0a3 commit 59e6a97

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

compose/internal/composeplugin/composeplugin.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,16 @@ func newCommand(command []string, filePaths []string) composeCommand {
163163
}
164164
}
165165

166-
//TO-DO: double check docker compose plugin logic
167-
//to see if it is necessary to implement forceRereate arg here
168166
func newUpCommand(filePaths []string, forceRereate bool) composeCommand {
169-
return newCommand([]string{"up", "-d"}, filePaths)
167+
args := []string{"up", "-d"}
168+
//set `--force-recreate` flag if forceRereate param is true
169+
if forceRereate {
170+
args = append(args, "--force-recreate")
171+
}
172+
return newCommand(args, filePaths)
170173
}
171174

175+
172176
func newDownCommand(filePaths []string) composeCommand {
173177
return newCommand([]string{"down", "--remove-orphans"}, filePaths)
174178
}

0 commit comments

Comments
 (0)