Commit Graph

12 Commits

Author SHA1 Message Date
vvzvlad
1f5987d6b0 feat(mcp): serve embedded community MCP server at /mcp
Replace the removed enterprise EE MCP (private apps/server/src/ee submodule,
license-gated /mcp route) with our docmost-mcp, vendored as an isolated ESM
workspace package and served by the server over HTTP — no enterprise license.

Backend:
- Add packages/mcp (@docmost/mcp): vendored docmost-mcp refactored into a
  side-effect-free createDocmostMcpServer() factory (38 tools preserved),
  stdio entry kept in stdio.ts, Streamable-HTTP session manager in http.ts.
- Add apps/server McpModule: @Post/@Get/@Delete('mcp') (served at /mcp via the
  existing global-prefix exclude), @SkipTransform + reply.hijack to bridge raw
  Fastify req/res into the SDK transport. The module dynamically imports the
  ESM-only package from CommonJS via a Function-indirected import resolved with
  require.resolve + file:// URL. Gated by the workspace ai.mcp toggle, a
  service-account (MCP_DOCMOST_EMAIL/PASSWORD/API_URL) and optional MCP_TOKEN;
  per-session idle eviction (MCP_SESSION_IDLE_MS).
- Drop the enterprise license check on mcpEnabled in workspace.service.
- Dockerfile: copy packages/mcp into the production image.
- .env.example: document MCP_DOCMOST_*, MCP_TOKEN, MCP_SESSION_IDLE_MS.

Frontend:
- Recreate the community "AI & MCP" workspace-settings panel (mcp-settings.tsx):
  admin-only toggle on settings.ai.mcp with optimistic update, copyable
  ${APP_URL}/mcp URL; wired into workspace-settings page. Reuses existing i18n.

Fixes:
- Pin packages/mcp tiptap deps to 3.20.4 (matching the client) and inline
  getStyleProperty, preventing a duplicate @tiptap/core@3.26.1 from leaking into
  the client editor via pnpm shamefully-hoist (was breaking apps/client tsc).
2026-06-16 23:54:53 +03:00
vvzvlad
4f05fb5d2e chore(fork): drop private ee submodule and retarget CI to GHCR
Remove the private apps/server/src/ee git submodule (github.com/docmost/ee)
and the now-empty .gitmodules so that `git clone --recurse-submodules` and CI
checkout no longer fail with 404. The server loads EE only via guarded runtime
require(), so the build succeeds without it (community edition).

Rewrite .github/workflows/release.yml for the fork:
- drop the GitHub App token step and `submodules: recursive` checkout
- publish to GHCR (ghcr.io/vvzvlad/gitmost) via the built-in GITHUB_TOKEN
  instead of Docker Hub (docmost/docmost) — no extra secrets required
- add `packages: write` permission and an IMAGE env var
- log in as github.repository_owner; rename release tarballs to gitmost-*

Repoint the Dockerfile image source label to the fork.
2026-06-16 21:15:47 +03:00
Philipinho
ac675e7d74 update dockerfile 2026-01-16 13:21:42 +00:00
Philipinho
2544775266 fix: switch to node slim image 2025-12-14 13:16:40 +00:00
Philipinho
4511db1526 fix 2025-03-06 18:32:25 +00:00
Philipinho
56d9e46fd3 * Upgrade Dockerfile to node 22
* Pin pnpm to pnpm@10.4.0
2025-03-06 18:29:15 +00:00
James Choi
d4b219d608 add COPY patches to Dockerfile (#400) 2024-10-14 09:13:36 +01:00
Marc
4433d5174d Add Source Label to Dockerfile (#157) 2024-08-20 13:09:36 +01:00
Philipinho
681a21a238 Update readme
* Rename storage volume
2024-06-28 17:29:46 +01:00
Philipinho
20c1a92885 Update Dockerfile
* Add volume to docker compose file
2024-06-27 15:32:23 +01:00
Philipinho
e73293856b move storage data directory to root 2024-06-27 15:07:48 +01:00
Philipinho
eef9081aaf dockerfile and docker-compose file 2024-06-07 17:21:19 +01:00