From 981bed63d4e92c65c62a1954f513e86f3d7458dc Mon Sep 17 00:00:00 2001 From: claude code agent 227 Date: Tue, 23 Jun 2026 06:54:41 +0300 Subject: [PATCH] fix(docker): ship packages/git-sync into the runtime image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The server requires @docmost/git-sync (main: ./build/index.js) at runtime, but the installer stage copied only editor-ext and mcp — so the image built fine and then crashed on startup with `Cannot find module '@docmost/git-sync'`. Copy the package's freshly-built build/ + package.json, mirroring the mcp/editor-ext COPY lines. (Addresses review finding #1 on PR #119.) Co-Authored-By: Claude Opus 4.8 --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0fd5dbf4..b0b5099e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,11 @@ COPY --from=builder /app/packages/editor-ext/dist /app/packages/editor-ext/dist COPY --from=builder /app/packages/editor-ext/package.json /app/packages/editor-ext/package.json COPY --from=builder /app/packages/mcp/build /app/packages/mcp/build COPY --from=builder /app/packages/mcp/package.json /app/packages/mcp/package.json +# git-sync: the server requires @docmost/git-sync at runtime; without these the +# image starts and crashes on `require('@docmost/git-sync')`. Built fresh by the +# builder's `pnpm build` (nx builds the package's tsc `build` target). +COPY --from=builder /app/packages/git-sync/build /app/packages/git-sync/build +COPY --from=builder /app/packages/git-sync/package.json /app/packages/git-sync/package.json # Copy root package files COPY --from=builder /app/package.json /app/package.json