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:
parent
4a9895218e
commit
76b3cf4d2b
@ -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
|
||||
}
|
||||
|
@ -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',
|
||||
},
|
||||
|
@ -1288,7 +1288,8 @@ const message = {
|
||||
version: '版本',
|
||||
status: '状态',
|
||||
versionHelper: 'PHP的版本,例如 v8.0',
|
||||
buildHelper: '选择的扩展越多,制作镜像过程中占用 CPU 越多,请尽量避免选择全部扩展',
|
||||
buildHelper:
|
||||
'选择的扩展越多,制作镜像过程中占用 CPU 越多,请尽量避免选择全部扩展,如果没有想要的扩展,可以手动输入之后选择',
|
||||
openrestryWarn: 'PHP 需要升级 OpenResty 至 1.21.4.1 版本以上才能使用',
|
||||
toupgrade: '去升级',
|
||||
},
|
||||
|
@ -6,6 +6,8 @@
|
||||
v-if="p.type == 'select'"
|
||||
:multiple="p.multiple"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
@change="updateParam"
|
||||
>
|
||||
<el-option
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user