feat: storage attachments, docker-args triggers, install-time migration

storage:mount and storage:unmount now accept the named-entry form (--container-dir, --phase, --process-type, --volume-subpath, --volume-readonly, --volume-chown), persisting attachments via the property list. The legacy host:container colon form is preserved for back-compat. Storage now emits its own docker-args-deploy and docker-args-run triggers so docker-local apps continue to receive bind mounts even after their data moves out of docker-options. The install trigger walks every app once per upgrade and converts legacy -v lines into legacy-<hash> entries plus attachments, draining the originals from docker-options last so a partial run leaves the old behavior intact. Lifecycle triggers post-delete, post-app-clone-setup, and post-app-rename-setup keep the attachment store in sync with app state.
This commit is contained in:
Jose Diaz-Gonzalez
2026-04-29 14:43:51 -04:00
parent 8a46d89181
commit e1b6bdb1d4
6 changed files with 453 additions and 30 deletions

View File

@@ -24,6 +24,27 @@ func main() {
phase := flag.Arg(1)
format := flag.Arg(2)
err = storage.TriggerStorageList(appName, phase, format)
case "storage-app-mounts":
appName := flag.Arg(0)
phase := flag.Arg(1)
err = storage.TriggerStorageAppMounts(appName, phase)
case "docker-args-deploy":
appName := flag.Arg(0)
err = storage.TriggerDockerArgs(appName, storage.PhaseDeploy)
case "docker-args-run":
appName := flag.Arg(0)
err = storage.TriggerDockerArgs(appName, storage.PhaseRun)
case "post-delete":
appName := flag.Arg(0)
err = storage.TriggerPostDelete(appName)
case "post-app-clone-setup":
oldName := flag.Arg(0)
newName := flag.Arg(1)
err = storage.TriggerPostAppCloneSetup(oldName, newName)
case "post-app-rename-setup":
oldName := flag.Arg(0)
newName := flag.Arg(1)
err = storage.TriggerPostAppRenameSetup(oldName, newName)
default:
err = fmt.Errorf("Invalid plugin trigger call: %s", trigger)
}