1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 00:09:16 +08:00

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

This commit is contained in:
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,