feat: 应用包图标使用站点 favicon

This commit is contained in:
2026-11-06 15:17:26 +08:00
parent e2d932c85f
commit 7830d2507b
+2
View File
@@ -53,6 +53,7 @@ def manifest(image: str, release: str) -> dict:
"user_auth": "app",
"admin_auth": "metrix",
"admin_path": "/admin",
"icon": "icon.svg",
"services": [
{"name": "web", "image": image, "image_file": "image.tar", "command": "", "port": WEB_PORT},
{"name": "worker", "image": image, "image_file": "image.tar", "command": "python -m worker.main"},
@@ -93,6 +94,7 @@ def write_bundle(image: str, release: str, target: Path) -> None:
_run(["docker", "save", "-o", str(tar), image])
with zipfile.ZipFile(partial, "w", compression=zipfile.ZIP_DEFLATED, compresslevel=6) as bundle:
bundle.writestr("metrix-app.json", json.dumps(manifest(image, release), ensure_ascii=False, indent=2) + "\n")
bundle.write(ROOT / "web" / "public" / "favicon.svg", "icon.svg")
bundle.write(tar, "image.tar")
os.replace(partial, target)