mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-10 03:30:53 +08:00
fix: 解决某些情况下应用状态异常的问题 (#1644)
This commit is contained in:
parent
5e7d5c0235
commit
87327053dc
2 changed files with 6 additions and 0 deletions
|
|
@ -593,6 +593,9 @@ func (a *AppInstallService) GetParams(id uint) (*response.AppConfig, error) {
|
||||||
config := getAppCommonConfig(envs)
|
config := getAppCommonConfig(envs)
|
||||||
config.DockerCompose = install.DockerCompose
|
config.DockerCompose = install.DockerCompose
|
||||||
res.Params = params
|
res.Params = params
|
||||||
|
if config.ContainerName == "" {
|
||||||
|
config.ContainerName = install.ContainerName
|
||||||
|
}
|
||||||
res.AppContainerConfig = config
|
res.AppContainerConfig = config
|
||||||
return &res, nil
|
return &res, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -381,6 +381,9 @@ func getContainerNames(install model.AppInstall) ([]string, error) {
|
||||||
for k := range containerMap {
|
for k := range containerMap {
|
||||||
containerNames = append(containerNames, k)
|
containerNames = append(containerNames, k)
|
||||||
}
|
}
|
||||||
|
if len(containerNames) == 0 {
|
||||||
|
containerNames = append(containerNames, install.ContainerName)
|
||||||
|
}
|
||||||
return containerNames, nil
|
return containerNames, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue