mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
feat(upgrade): add in_docker flag to RuntimeInfo and adjust upgrade interval based on Docker environment
This commit is contained in:
parent
174f8baf18
commit
406d9113e7
3 changed files with 17 additions and 9 deletions
|
@ -13,6 +13,7 @@ type RuntimeInfo struct {
|
|||
Arch string `json:"arch"`
|
||||
ExPath string `json:"ex_path"`
|
||||
CurVersion *Info `json:"cur_version"`
|
||||
InDocker bool `json:"in_docker"`
|
||||
}
|
||||
|
||||
func GetRuntimeInfo() (r RuntimeInfo, err error) {
|
||||
|
@ -32,6 +33,7 @@ func GetRuntimeInfo() (r RuntimeInfo, err error) {
|
|||
Arch: runtime.GOARCH,
|
||||
ExPath: realPath,
|
||||
CurVersion: GetVersionInfo(),
|
||||
InDocker: os.Getenv("NGINX_UI_IN_DOCKER") == "true",
|
||||
}
|
||||
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue