mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
feat(ota): upgrade container
This commit is contained in:
parent
a88f8646e6
commit
e2c43be24a
19 changed files with 708 additions and 28 deletions
|
@ -12,6 +12,7 @@ import (
|
|||
"github.com/0xJacky/Nginx-UI/internal/cert"
|
||||
"github.com/0xJacky/Nginx-UI/internal/cluster"
|
||||
"github.com/0xJacky/Nginx-UI/internal/cron"
|
||||
"github.com/0xJacky/Nginx-UI/internal/docker"
|
||||
"github.com/0xJacky/Nginx-UI/internal/passkey"
|
||||
"github.com/0xJacky/Nginx-UI/internal/validation"
|
||||
"github.com/0xJacky/Nginx-UI/model"
|
||||
|
@ -35,6 +36,7 @@ func Boot() {
|
|||
InitCryptoSecret,
|
||||
validation.Init,
|
||||
cache.Init,
|
||||
CheckAndCleanupOTAContainers,
|
||||
}
|
||||
|
||||
syncs := []func(){
|
||||
|
@ -129,3 +131,14 @@ func InitJsExtensionType() {
|
|||
// See https://github.com/golang/go/issues/32350
|
||||
_ = mime.AddExtensionType(".js", "text/javascript; charset=utf-8")
|
||||
}
|
||||
|
||||
// CheckAndCleanupOTAContainers Check and cleanup OTA update temporary containers
|
||||
func CheckAndCleanupOTAContainers() {
|
||||
// Execute the third step cleanup operation at startup
|
||||
err := docker.UpgradeStepThree()
|
||||
if err != nil {
|
||||
logger.Error("Failed to cleanup OTA containers:", err)
|
||||
} else {
|
||||
logger.Info("OTA container cleanup completed successfully")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue