-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
20 lines (19 loc) · 846 Bytes
/
Copy pathDockerfile
File metadata and controls
20 lines (19 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Container image for hosting the FileToPDF MCP server over Streamable HTTP.
# Used by Smithery (runtime: container) and any container host (Fly, Render, Cloud Run).
FROM node:22-alpine AS build
WORKDIR /app
# Copy sources BEFORE install so the build has its inputs, and skip lifecycle
# scripts (the `prepare` hook runs tsc itself — we invoke the build explicitly).
COPY package.json package-lock.json* tsconfig.json ./
COPY src ./src
RUN npm install --ignore-scripts && npm run build
FROM node:22-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY package.json package-lock.json* ./
# --ignore-scripts so the `prepare` hook doesn't try to rebuild without devDeps.
RUN npm install --omit=dev --ignore-scripts
COPY --from=build /app/dist ./dist
# The HTTP server listens on $PORT (default 8080) at /mcp.
EXPOSE 8080
CMD ["node", "dist/http.js"]