diff --git a/backend/app/service/app.go b/backend/app/service/app.go index 05feb5001..d43362efe 100644 --- a/backend/app/service/app.go +++ b/backend/app/service/app.go @@ -335,9 +335,6 @@ func (a AppService) Install(ctx context.Context, req request.AppInstallCreate) ( if err = createLink(ctx, app, appInstall, req.Params); err != nil { return } - if err = upAppPre(app, appInstall); err != nil { - return - } go func() { if err = copyData(app, appDetail, appInstall, req); err != nil { if appInstall.Status == constant.Installing { @@ -347,6 +344,9 @@ func (a AppService) Install(ctx context.Context, req request.AppInstallCreate) ( _ = appInstallRepo.Save(context.Background(), appInstall) return } + if err = upAppPre(app, appInstall); err != nil { + return + } go func() { _, _ = http.Get(appDetail.DownloadCallBackUrl) }() diff --git a/backend/app/service/app_install.go b/backend/app/service/app_install.go index 69e7d5ce3..d2801b5e3 100644 --- a/backend/app/service/app_install.go +++ b/backend/app/service/app_install.go @@ -257,6 +257,9 @@ func (a *AppInstallService) Update(req request.AppInstalledUpdate) error { backupDockerCompose := installed.DockerCompose if req.Advanced { composeMap := make(map[string]interface{}) + if err = yaml.Unmarshal([]byte(installed.DockerCompose), &composeMap); err != nil { + return err + } if err := addDockerComposeCommonParam(composeMap, installed.ServiceName, req.AppContainerConfig, req.Params); err != nil { return err }