mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-28 19:14:13 +08:00
Fix issue with runtime environment restart failure (#8008)
This commit is contained in:
parent
5e2bb27a47
commit
1f716cb85d
@ -201,7 +201,7 @@ func (u *ContainerService) CreateCompose(req dto.ComposeCreate) error {
|
||||
}
|
||||
go func() {
|
||||
taskItem.AddSubTask(i18n.GetMsgByKey("ComposeCreate"), func(t *task.Task) error {
|
||||
cmd := exec.Command("docker-compose", "-f", req.Path, "up", "-d")
|
||||
cmd := exec.Command("docker", "compose", "-f", req.Path, "up", "-d")
|
||||
out, err := cmd.CombinedOutput()
|
||||
taskItem.Log(i18n.GetWithName("ComposeCreateRes", string(out)))
|
||||
if err != nil {
|
||||
|
@ -150,7 +150,7 @@ func runComposeCmdWithLog(operate string, composePath string, logPath string) er
|
||||
|
||||
err = cmd.Run()
|
||||
if err != nil {
|
||||
return errors.New(buserr.New("ErrRuntimeStart").Error() + ":" + err.Error())
|
||||
return errors.New(buserr.New("ErrRuntimeStart").Error() + ":" + stderrBuf.String())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -263,7 +263,7 @@ func buildRuntime(runtime *model.Runtime, oldImageID string, oldEnv string, rebu
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Hour)
|
||||
defer cancel()
|
||||
|
||||
cmd := exec.CommandContext(ctx, "docker-compose", "-f", composePath, "build")
|
||||
cmd := exec.CommandContext(ctx, "docker", "compose", "-f", composePath, "build")
|
||||
cmd.Stdout = logFile
|
||||
var stderrBuf bytes.Buffer
|
||||
multiWriterStderr := io.MultiWriter(&stderrBuf, logFile)
|
||||
|
@ -306,6 +306,7 @@ const message = {
|
||||
installerr: 'Installation failed',
|
||||
applyerror: 'Apply failed',
|
||||
systemrestart: 'Interrupted',
|
||||
starterr: 'Startup failed',
|
||||
},
|
||||
units: {
|
||||
second: 'Second',
|
||||
|
@ -300,6 +300,7 @@ const message = {
|
||||
installerr: 'インストールに失敗しました',
|
||||
applyerror: '適用に失敗しました',
|
||||
systemrestart: '中断',
|
||||
starterr: '起動に失敗しました',
|
||||
},
|
||||
units: {
|
||||
second: '2番目|2番目|秒',
|
||||
|
@ -301,6 +301,7 @@ const message = {
|
||||
installerr: '설치 실패',
|
||||
applyerror: '적용 실패',
|
||||
systemrestart: '중단됨',
|
||||
starterr: '시작 실패',
|
||||
},
|
||||
units: {
|
||||
second: '초 | 초 | 초',
|
||||
|
@ -307,6 +307,7 @@ const message = {
|
||||
installerr: 'Pemasangan gagal',
|
||||
applyerror: 'Permohonan gagal',
|
||||
systemrestart: 'Dihentikan',
|
||||
starterr: 'Permulaan gagal',
|
||||
},
|
||||
units: {
|
||||
second: 'saat | saat | saat',
|
||||
|
@ -305,6 +305,7 @@ const message = {
|
||||
installerr: 'Falha na instalação',
|
||||
applyerror: 'Falha na aplicação',
|
||||
systemrestart: 'Interrompido',
|
||||
starterr: 'Falha na inicialização',
|
||||
},
|
||||
units: {
|
||||
second: 'segundo | segundos | segundos',
|
||||
|
@ -301,6 +301,7 @@ const message = {
|
||||
installerr: 'Ошибка установки',
|
||||
applyerror: 'Ошибка применения',
|
||||
systemrestart: 'Прервано',
|
||||
starterr: 'Ошибка запуска',
|
||||
},
|
||||
units: {
|
||||
second: ' секунда | секунда | секунд',
|
||||
|
@ -300,6 +300,7 @@ const message = {
|
||||
installerr: '安裝失敗',
|
||||
applyerror: '申請失敗',
|
||||
systemrestart: '中斷',
|
||||
starterr: '啟動失敗',
|
||||
},
|
||||
units: {
|
||||
second: '秒',
|
||||
|
@ -298,6 +298,7 @@ const message = {
|
||||
installerr: '安装失败',
|
||||
applyerror: '申请失败',
|
||||
systemrestart: '中断',
|
||||
starterr: '启动失败',
|
||||
},
|
||||
units: {
|
||||
second: '秒',
|
||||
|
Loading…
x
Reference in New Issue
Block a user