Browse Source

feat: 启动运行环境增加默认网络检测 (#6820)

pull/6824/head
zhengkunwang 4 weeks ago committed by GitHub
parent
commit
7f453aa145
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      backend/app/service/runtime.go
  2. 4
      backend/app/service/website.go

3
backend/app/service/runtime.go

@ -495,6 +495,9 @@ func (r *RuntimeService) OperateRuntime(req request.RuntimeOperate) error {
_ = runtimeRepo.Save(runtime)
}
}()
go func() {
_ = docker.CreateDefaultDockerNetwork()
}()
switch req.Operate {
case constant.RuntimeUp:
if err = runComposeCmdWithLog(req.Operate, runtime.GetComposePath(), runtime.GetLogPath()); err != nil {

4
backend/app/service/website.go

@ -309,10 +309,6 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error)
if err != nil {
return err
}
if err = docker.CreateDefaultDockerNetwork(); err != nil {
err = buserr.WithDetail(constant.Err1PanelNetworkFailed, err.Error(), nil)
return
}
website.RuntimeID = runtime.ID
switch runtime.Type {
case constant.RuntimePHP:

Loading…
Cancel
Save