Try to keep miren deploy up to date
I don’t think this quite works yet still, but I want it off my unstaged changes! Whoop whoop.
2 files changed,
+12
−3
Dockerfile.agent+4 −2deploy/miren/agent.sh+8 −1
diff --git a/Dockerfile.agent b/Dockerfile.agent| index 6647aeb..b134a0b 100644 |
| --- a/Dockerfile.agent |
| +++ b/Dockerfile.agent |
| @@ -8,9 +8,11 @@ WORKDIR /app |
| COPY agent/package.json agent/package-lock.json ./agent/ |
| RUN cd agent && npm ci --omit=dev |
| -# App source + the shared crypto module (kept at ../web/static/crypto.js). |
| +# App source + the shared browser modules the sidecar imports (crypto.js for E2E, |
| +# bot-commands.js for the slash-command list) — kept at ../web/static/ so the |
| +# relative imports resolve identically to the browser. |
| COPY agent/ ./agent/ |
| -COPY web/static/crypto.js ./web/static/crypto.js |
| +COPY web/static/crypto.js web/static/bot-commands.js ./web/static/ |
| WORKDIR /app/agent |
| EXPOSE 8080 |
diff --git a/deploy/miren/agent.sh b/deploy/miren/agent.sh| index c00812b..8dcad58 100755 |
| --- a/deploy/miren/agent.sh |
| +++ b/deploy/miren/agent.sh |
| @@ -28,7 +28,14 @@ TMP="$(mktemp -d)" |
| trap 'rm -rf "$TMP"' EXIT |
| cp -R "$REPO"/. "$TMP"/ |
| -rm -rf "$TMP/.git" |
| +# Trim the context before Miren uploads it (it uploads this dir FIRST, so a fat |
| +# working tree makes every deploy crawl). The agent image only needs agent/ + |
| +# web/static/crypto.js (deps are rebuilt via `npm ci` in Dockerfile.agent), so |
| +# drop the native ios/ build output (~700MB), node_modules everywhere, VCS/agent |
| +# dirs, the local binary, and *.db. Mirrors deploy/miren.sh. |
| +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 |
| sed "s/__APP__/$APP/g" "$REPO/.miren/agent.app.toml" > "$TMP/.miren/app.toml" |
| ENVARGS=(-e "LCHAT_BASE=$LCHAT_BASE") |