feat: 创建运行环境网站增加默认网络创建 (#6807)

This commit is contained in:
zhengkunwang 2024-10-22 19:24:34 +08:00 committed by GitHub
parent 745bb98abe
commit df5b69756c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -309,6 +309,10 @@ 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: