-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.mcp
More file actions
61 lines (51 loc) · 2.07 KB
/
Copy pathDockerfile.mcp
File metadata and controls
61 lines (51 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# DocForge — MCP server image (stdio).
#
# Runs dist/index.js (the MCP stdio server) directly — no Slack, no HTTP.
# This is the image MCP directories (e.g. Glama) use to start the server and
# probe it with introspection requests. For the Slack Agent delivery image,
# see ./Dockerfile.
# ---- build stage ---------------------------------------------------------
FROM node:22-bookworm-slim AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY tsconfig.json ./
COPY src ./src
RUN npm run build
# ---- runtime stage -------------------------------------------------------
FROM node:22-bookworm-slim AS runtime
WORKDIR /app
ENV NODE_ENV=production
# Pinned Typst (same version/asset as CI).
ARG TYPST_VERSION=0.14.2
ARG TYPST_SHA256=a6044cbad2a954deb921167e257e120ac0a16b20339ec01121194ff9d394996d
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl xz-utils ca-certificates \
&& curl -fsSL -o /tmp/typst.tar.xz "https://github.com/typst/typst/releases/download/v${TYPST_VERSION}/typst-x86_64-unknown-linux-musl.tar.xz" \
&& echo "${TYPST_SHA256} /tmp/typst.tar.xz" | sha256sum -c - \
&& tar -xJf /tmp/typst.tar.xz -C /tmp \
&& mv /tmp/typst-x86_64-unknown-linux-musl/typst /usr/local/bin/typst \
&& chmod +x /usr/local/bin/typst \
&& apt-get purge -y curl xz-utils && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /tmp/typst-* /tmp/typst.tar.xz \
&& typst --version
# Production dependencies only.
COPY package.json package-lock.json ./
RUN npm ci --omit=dev && npm cache clean --force
# Build output + runtime assets.
COPY --from=build /app/dist ./dist
COPY templates ./templates
COPY brand_kits ./brand_kits
COPY packages ./packages
COPY marketplace ./marketplace
COPY vendor ./vendor
COPY scripts ./scripts
# Fail the build if Typst is below pin or a vendored package is missing.
RUN node scripts/check-typst-version.mjs \
&& node scripts/check-vendored-packages.mjs
# Persisted document workspaces.
ENV DOCFORGE_DATA_ROOT=/data/documents
RUN mkdir -p /data/documents
VOLUME ["/data"]
# MCP server over stdio.
CMD ["node", "dist/index.js"]