mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
fix: 解决删除应用失败的BUG
This commit is contained in:
parent
3f02358708
commit
9b5ea3f317
@ -129,7 +129,7 @@ func (a AppInstallService) Operate(req dto.AppInstallOperate) error {
|
||||
}
|
||||
install.Status = constant.Running
|
||||
case dto.Down:
|
||||
out, err := compose.Down(dockerComposePath)
|
||||
out, err := compose.Stop(dockerComposePath)
|
||||
if err != nil {
|
||||
return handleErr(install, err, out)
|
||||
}
|
||||
|
@ -13,6 +13,12 @@ func Up(filePath string) (string, error) {
|
||||
}
|
||||
|
||||
func Down(filePath string) (string, error) {
|
||||
cmd := exec.Command("docker-compose", "-f", filePath, "down")
|
||||
stdout, err := cmd.CombinedOutput()
|
||||
return string(stdout), err
|
||||
}
|
||||
|
||||
func Stop(filePath string) (string, error) {
|
||||
cmd := exec.Command("docker-compose", "-f", filePath, "stop")
|
||||
stdout, err := cmd.CombinedOutput()
|
||||
return string(stdout), err
|
||||
|
Loading…
x
Reference in New Issue
Block a user