Browse Source

fix: 解决 node.js 运行环境网站第一次创建失败的问题 (#2459)

pull/2462/head
zhengkunwang 1 year ago committed by GitHub
parent
commit
0dda4411da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      backend/app/service/runtime.go
  2. 2
      backend/app/service/website_utils.go

3
backend/app/service/runtime.go

@ -320,7 +320,8 @@ func (r *RuntimeService) Update(req request.RuntimeUpdate) error {
CodeDir: req.CodeDir, CodeDir: req.CodeDir,
Version: req.Version, Version: req.Version,
NodeConfig: request.NodeConfig{ NodeConfig: request.NodeConfig{
Port: req.Port, Port: req.Port,
Install: true,
}, },
} }
composeContent, envContent, _, err := handleParams(create, projectDir) composeContent, envContent, _, err := handleParams(create, projectDir)

2
backend/app/service/website_utils.go

@ -154,7 +154,7 @@ func createWebsiteFolder(nginxInstall model.AppInstall, website *model.Website,
} }
} }
} }
if website.Type == constant.Static || website.Type == constant.Runtime { if website.Type == constant.Static || (website.Type == constant.Runtime && runtime.Type == constant.RuntimePHP) {
if err := createIndexFile(website, runtime); err != nil { if err := createIndexFile(website, runtime); err != nil {
return err return err
} }

Loading…
Cancel
Save