feat: add controller self-update mechanism (v0.16.0)
New selfupdate package: version parsing, audit state file, updater with
Gitea registry V2 check, docker pull + compose rewrite + compose up flow.
- API: /api/selfupdate/{status,check,update} with session+bearer auth
- UI: Settings "Verzió és frissítés" card with check/install buttons + JS polling
- Scheduler: periodic check (6h default) + optional daily auto-update
- Notifications: success/failure on post-update startup verification
- Alert: info banner when update available
- docker-compose.yml: add directory bind mount for compose file access
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -118,6 +118,7 @@ type SelfUpdateConfig struct {
|
||||
CheckInterval string `yaml:"check_interval"`
|
||||
Image string `yaml:"image"`
|
||||
AutoUpdate bool `yaml:"auto_update"`
|
||||
AutoUpdateTime string `yaml:"auto_update_time"`
|
||||
HealthTimeoutSeconds int `yaml:"health_timeout_seconds"`
|
||||
}
|
||||
|
||||
@@ -206,6 +207,8 @@ func applyDefaults(cfg *Config) {
|
||||
di(&cfg.Monitoring.Thresholds.TemperatureWarnCelsius, 75)
|
||||
d(&cfg.Hub.PushInterval, "15m")
|
||||
d(&cfg.SelfUpdate.CheckInterval, "6h")
|
||||
d(&cfg.SelfUpdate.Image, "gitea.dooplex.hu/admin/felhom-controller")
|
||||
d(&cfg.SelfUpdate.AutoUpdateTime, "04:30")
|
||||
di(&cfg.SelfUpdate.HealthTimeoutSeconds, 60)
|
||||
d(&cfg.Logging.Level, "info")
|
||||
di(&cfg.Logging.MaxSizeMB, 10)
|
||||
|
||||
Reference in New Issue
Block a user