fix library display and docker compose update

This commit is contained in:
ShukeBta
2026-06-27 16:54:33 +08:00
parent 41f39d9701
commit a2be6a2127
19 changed files with 701 additions and 88 deletions
+6
View File
@@ -18,6 +18,7 @@ const (
SystemUpdateImageSettingKey = "system.update.image"
SystemUpdateWatchtowerImageSettingKey = "system.update.watchtower_image"
SystemUpdateCommandSettingKey = "system.update.command"
SystemUpdateComposeDirSettingKey = "system.update.compose_dir"
DefaultSystemUpdateImage = "ghcr.io/shukebta/mediastation-go:latest"
DefaultSystemUpdateWatchtowerImage = "containrrr/watchtower:latest"
@@ -33,6 +34,10 @@ var ErrSystemUpdateRunning = errors.New("system update already running")
type SystemUpdateStatus struct {
Image string `json:"image"`
WatchtowerImage string `json:"watchtower_image,omitempty"`
UpdateMode string `json:"update_mode,omitempty"`
ComposeDir string `json:"compose_dir,omitempty"`
ComposeFile string `json:"compose_file,omitempty"`
ComposeCommand string `json:"compose_command,omitempty"`
ContainerID string `json:"container_id,omitempty"`
ContainerName string `json:"container_name,omitempty"`
CurrentImageID string `json:"current_image_id,omitempty"`
@@ -199,6 +204,7 @@ func (s *SystemUpdateService) baseStatus(ctx context.Context) SystemUpdateStatus
return SystemUpdateStatus{
Image: image,
WatchtowerImage: watchtowerImage,
UpdateMode: "compose",
ContainerID: currentContainerID(),
}
}