eleven / messenger Public

deploy: trim the home-server upload context (drop ios/, *.db, node_modules) (#155)

deploy-home.sh copied the whole working tree into the Miren upload context and
only removed .git — so it uploaded the ~700MB ios/ build output AND the local
lchat.db (user data, which must never leave the machine), unlike
deploy-instance.sh which trims exactly these. Mirror that trimming (keeping
home/, the app being built). The home image only compiles ./home from the shared
module, so none of the dropped paths are needed.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Paul Campbell 7f86f7aebc71036c08d7678c451e6ed0bdd53d59 parent 2bcfc29
1 file changed, +10 −1
  • deploy-home.sh +10 −1
diff --git a/deploy-home.sh b/deploy-home.sh
index 0e356b4..5ab8fe6 100755
--- a/deploy-home.sh
+++ b/deploy-home.sh
@@ -25,7 +25,16 @@ trap 'rm -rf "$TMP"' EXIT
# The Dockerfile and app.toml live under home/ (keeping the messenger's
# defaults untouched); stage them where Miren expects them.
cp -R "$REPO"/. "$TMP"/
-rm -rf "$TMP/.git"
+# Trim the context before Miren uploads it (same reasoning as deploy-instance.sh:
+# Miren uploads this dir FIRST, so a fat working tree makes every deploy slow).
+# Drop what the home image never needs: the native ios/ build output (~700MB),
+# node_modules, VCS/editor/agent dirs, the local binary, and *.db — the local
+# SQLite holding user data, which must never leave the machine. home/ is kept
+# (it's the app being built). The build only compiles ./home from the shared
+# module, so none of these are needed.
+rm -rf "$TMP/.git" "$TMP/ios" "$TMP/.claude" "$TMP/lchat" \
+ "$TMP"/*.db "$TMP"/*.db-wal "$TMP"/*.db-shm
+find "$TMP" -name node_modules -type d -prune -exec rm -rf {} + 2>/dev/null || true
cp "$REPO/home/Dockerfile" "$TMP/Dockerfile.home"
sed -e "s/^name = \"home\"\$/name = \"$INSTANCE\"/" \
-e "s/^name = \"home-data\"\$/name = \"${INSTANCE}-data\"/" \