feat(deploy): async compose-up for instant UI feedback (v0.28.2)

Deploy API now returns immediately after validation + config save.
docker compose up -d runs in a background goroutine so the UI shows
progress during image pulls instead of blocking for 30-60s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 12:08:08 +01:00
parent 4a6ab4d61c
commit 563cf07ec8
6 changed files with 70 additions and 16 deletions
+6 -1
View File
@@ -29,6 +29,7 @@ const (
StatePaused ContainerState = "paused"
StateUnknown ContainerState = "unknown"
StateNotDeployed ContainerState = "not_deployed"
StateDeploying ContainerState = "deploying" // compose up in progress (image pull, etc.)
StateOrphaned ContainerState = "orphaned"
)
@@ -51,6 +52,8 @@ type Stack struct {
Orphaned bool `json:"orphaned"` // Deployed but no catalog template
Containers []ContainerInfo `json:"containers"`
AppConfig *AppConfig `json:"app_config,omitempty"`
Deploying bool `json:"deploying"` // compose up in progress
DeployError string `json:"deploy_error,omitempty"` // last async deploy error
LastUpdated time.Time `json:"last_updated"`
}
@@ -250,7 +253,9 @@ func (m *Manager) refreshStatusLocked() error {
containers, exists := projectContainers[name]
if !exists {
stack.Containers = nil
if stack.Deployed {
if stack.Deploying {
stack.State = StateDeploying
} else if stack.Deployed {
stack.State = StateStopped
} else {
stack.State = StateNotDeployed