Files
tuio/internal/tui/steps.go
T
teste.inaba a05b98fdf5 feat: auto-update app-dono-cliente when a new image is pushed to :latest
Adds a StepRunUpdater step that starts app-dono-updater after the app
container comes up: a poll loop (docker pull, compare image IDs,
recreate on change) baked into the official docker:cli image via
`sh -c`, reusing the same docker run argv as the initial container
start so the two can't drift.

Not built on Watchtower: containrrr/watchtower was archived upstream
in Dec 2025 with no maintained successor recommended for production
use, so this avoids taking on that dependency.
2026-08-26 12:30:44 -03:00

49 lines
934 B
Go

package tui
type step int
const (
// Docker Validation
StepCheckDocker step = iota
StepDockerInstall
// Image Fetching
StepDockerLogin
StepDownloadImage
// IP Stuff
StepIPQuestion
StepWireguardConfig
StepGenerateWireguardFile
StepDownloadWireguard
StepRunWireguard
// Docker Config
StepAppConfig
StepServerConfig
StepDatabaseConfig
StepCertConfig
// Review
StepReview
// Finalizing
StepGenerateFile
StepRunDocker
StepRunUpdater
StepDone
)
// isInputStep reports whether a step collects user input and therefore participates
// in back navigation. Action/wait steps (downloads, file generation, container runs)
// are excluded so that "back" never re-enters a side-effecting step.
func isInputStep(s step) bool {
switch s {
case StepDockerLogin, StepIPQuestion, StepWireguardConfig,
StepAppConfig, StepServerConfig, StepDatabaseConfig,
StepCertConfig, StepReview:
return true
}
return false
}