Per-stack auto-update policy on the stack Overview tab. When the background
image-update check finds a newer registry digest for one of a stack's images,
the stack is pulled + redeployed (or just flagged, "notify only"). Only running
stacks are auto-redeployed; a stopped stack is skipped, never silently started.
- models/auto_update.py: AutoUpdate(stack_id, agent_id, enabled, redeploy,
last_run/status/result) + schemas; registered in models/__init__.py.
- update_service: DB-free stack_images/stack_updates helpers (agent reuses
them); agent GET /agent/stacks/{id}/updates.
- services/auto_update_service.py: run_due/run_policy (local pull+up via
compose_service, remote via agent_service POST /agent/stacks/{id}/update,
notify-only with per-transition dedup); lazy-called from
update_service.background_loop. New stack_auto_updated notify event.
- routers: GET/PUT/run /api/stacks/{id}/auto-update and the
/api/agents/{id}/stacks/{sid}/auto-update variants (policy stored centrally).
- frontend: api/autoUpdate.ts + AutoUpdatePanel (enable, redeploy|notify-only,
Check now, last-run status) on StackDetail + RemoteStackDetail; EVENT_LABELS
gains stack_auto_updated + backup_failed.
Live-verified all four paths (updated / update-available / up-to-date /
skipped) against real compose.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
16 lines
576 B
Python
16 lines
576 B
Python
"""SQLModel table models. Importing this package registers all tables."""
|
|
from models.agent import Agent
|
|
from models.audit import AuditLog
|
|
from models.auto_update import AutoUpdate
|
|
from models.backup_destination import BackupDestination
|
|
from models.backup_schedule import BackupSchedule
|
|
from models.setting import Setting, Webhook
|
|
from models.stack import Stack
|
|
from models.template import Template
|
|
from models.user import User
|
|
|
|
__all__ = [
|
|
"User", "Stack", "AuditLog", "Template", "Setting", "Webhook", "Agent",
|
|
"BackupDestination", "BackupSchedule", "AutoUpdate",
|
|
]
|