feat(install): pipelines update re-runs the recorded install from the source checkout; --fresh skips Docker migration

This commit is contained in:
2026-10-23 23:37:35 +01:00
parent e46c762394
commit 9bad1bd824
5 changed files with 116 additions and 3 deletions
+12 -2
View File
@@ -722,7 +722,10 @@ class Setup:
# Migrate existing Docker data before creating native ntfy accounts so a
# migrated auth store (the phone's credentials) is preserved rather than
# shadowed by a freshly bootstrapped one.
self.migrate_docker(prefix, args.replace_data)
if args.fresh:
print("Starting empty (--fresh); existing Docker volumes are left untouched.")
else:
self.migrate_docker(prefix, args.replace_data)
self.bootstrap_ntfy(prefix, config_path)
timezone = args.timezone
if not timezone:
@@ -764,6 +767,9 @@ class Setup:
"config": str(config_path), "base_url": base_url,
"version": resolution.get("tag") or resolution.get("version")},
"web": web,
# `pipelines update` re-runs this installer from here, the same way.
"source": str(self.directory),
"install_args": list(getattr(args, "argv", [])),
}
self.register_service(service_path, manifest)
self.write_manifest(prefix, manifest)
@@ -820,9 +826,13 @@ def arguments(argv=None):
help="Explicitly enable pipeline publication; fresh native installs default to enabled")
role.add_argument("--no-authoring", dest="allow_authoring", action="store_false",
help="Execution-only server; disable pipeline publication (reinstalls otherwise preserve the recorded role)")
parser.add_argument("--fresh", action="store_true",
help="Start with empty data even when an earlier Docker installation's volumes exist")
parser.add_argument("--replace-data", action="store_true",
help="Allow Docker migration to replace an existing native database/auth store")
return parser.parse_args(argv)
parsed = parser.parse_args(argv)
parsed.argv = list(sys.argv[1:] if argv is None else argv)
return parsed
if __name__ == "__main__":