feat: 运行环境支持手动输入 PHP 扩展 (#668)

pull/670/head
zhengkunwang223 2023-04-17 14:04:22 +08:00 committed by GitHub
parent 4a9895218e
commit 76b3cf4d2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 3 deletions

View File

@ -8,7 +8,9 @@ import (
"github.com/1Panel-dev/1Panel/backend/global"
"github.com/1Panel-dev/1Panel/backend/utils/docker"
"github.com/1Panel-dev/1Panel/backend/utils/files"
"github.com/docker/cli/cli/command"
"github.com/subosito/gotenv"
"os"
"path"
"strings"
)
@ -87,7 +89,16 @@ func getComposeService(name, runtimeDir string, composeFile, env []byte, skipNor
if err != nil {
return nil, err
}
composeService, err := docker.NewComposeService()
logPath := path.Join(runtimeDir, "build.log")
fileOp := files.NewFileOp()
if fileOp.Stat(logPath) {
_ = fileOp.DeleteFile(logPath)
}
file, err := os.Create(logPath)
if err != nil {
return nil, err
}
composeService, err := docker.NewComposeService(command.WithOutputStream(file))
if err != nil {
return nil, err
}

View File

@ -1308,7 +1308,7 @@ const message = {
status: 'Status',
versionHelper: 'PHP version, e.g. v8.0',
buildHelper:
'The more extensions you select, the more CPU will be occupied during the image making process, so avoid selecting all extensions',
'The more extensions you select, the more CPU will be occupied during the image making process, so avoid selecting all extensions,If there is no extension you want, you can manually enter it and select it',
openrestryWarn: 'PHP needs to be upgraded to OpenResty to version 1.21.4.1 or later to use',
toupgrade: 'To Upgrade',
},

View File

@ -1288,7 +1288,8 @@ const message = {
version: '',
status: '',
versionHelper: 'PHP, v8.0',
buildHelper: ' CPU ',
buildHelper:
' CPU ',
openrestryWarn: 'PHP OpenResty 1.21.4.1 使',
toupgrade: '',
},

View File

@ -6,6 +6,8 @@
v-if="p.type == 'select'"
:multiple="p.multiple"
filterable
allow-create
default-first-option
@change="updateParam"
>
<el-option

View File

@ -6,6 +6,8 @@
v-if="p.type == 'select'"
:multiple="p.multiple"
filterable
allow-create
default-first-option
@change="updateParam"
>
<el-option
@ -31,6 +33,7 @@ interface ParamObj extends App.FromField {
disabled: false;
childProp: string;
}
const props = defineProps({
form: {
type: Object,