fix: incorrect restart strategy display in app editor (#10136)

This commit is contained in:
CityFun 2025-08-25 18:56:58 +08:00 committed by GitHub
parent 261cb2061b
commit 9cf52ccc97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 0 deletions

View file

@ -486,6 +486,11 @@ func (a AppService) Install(req request.AppInstallCreate) (appInstall *model.App
req.Params["DATABASE_NAME"] = database.Name
}
}
if app.Key == "openresty" {
req.Params["CONTAINER_PACKAGE_URL"] = "http://archive.ubuntu.com/ubuntu/"
req.Params["RESTY_ADD_PACKAGE_BUILDDEPS"] = ""
req.Params["RESTY_CONFIG_OPTIONS_MORE"] = ""
}
paramByte, err = json.Marshal(req.Params)
if err != nil {
return

View file

@ -808,6 +808,7 @@ func upgradeInstall(req request.AppInstallUpgrade) error {
if install.App.Key == constant.AppOpenresty {
if err = buildNginx(t); err != nil {
t.Log(err.Error())
return err
}
}

View file

@ -290,6 +290,9 @@ const get = async () => {
paramModel.isHostMode = res.data.hostMode;
paramModel.specifyIP = res.data.specifyIP;
paramModel.restartPolicy = res.data.restartPolicy || 'no';
if (paramModel.restartPolicy === 'on-failure:5') {
paramModel.restartPolicy = 'on-failure';
}
appConfigUpdate.value.webUI = res.data.webUI;
if (res.data.webUI != '') {
const httpConfig = splitHttp(res.data.webUI);