mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 02:45:49 +02:00
feat(ota): upgrade container
This commit is contained in:
parent
a88f8646e6
commit
e2c43be24a
19 changed files with 708 additions and 28 deletions
23
internal/cmd/upgrade_docker.go
Normal file
23
internal/cmd/upgrade_docker.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/0xJacky/Nginx-UI/internal/docker"
|
||||
"github.com/uozi-tech/cosy/logger"
|
||||
"github.com/urfave/cli/v3"
|
||||
)
|
||||
|
||||
// Command to be executed in the temporary container
|
||||
var UpgradeDockerStep2Command = &cli.Command{
|
||||
Name: "upgrade-docker-step2",
|
||||
Usage: "Execute the second step of Docker container upgrade (to be run inside the temp container)",
|
||||
Action: UpgradeDockerStep2,
|
||||
}
|
||||
|
||||
// UpgradeDockerStep2 executes the second step in the temporary container
|
||||
func UpgradeDockerStep2(ctx context.Context, command *cli.Command) error {
|
||||
logger.Info("Starting Docker OTA upgrade step 2 from CLI...")
|
||||
|
||||
return docker.UpgradeStepTwo(ctx)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue