mirror of
https://github.com/1Panel-dev/1Panel
synced 2024-11-22 16:10:22 +00:00
feat: 启动运行环境增加默认网络检测 (#6820)
This commit is contained in:
parent
123997fa13
commit
7f453aa145
@ -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 {
|
||||
|
@ -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…
Reference in New Issue
Block a user