Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions integrations/mcp-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
FROM node:22-alpine AS build
# NOTE: pin this to a specific digest for fully reproducible/immutable
# builds once you've verified one for your target platform(s), e.g.:
# docker pull node:22-alpine && docker inspect --format='{{index .RepoDigests 0}}' node:22-alpine
# then replace the line above with `FROM node:22-alpine@sha256:<digest> AS build`
# (and the second FROM below with the same digest).
FROM node:24-alpine AS build
RUN corepack enable
WORKDIR /app

Expand All @@ -16,18 +11,21 @@ COPY integrations/mcp-server/package.json integrations/mcp-server/tsconfig.json
COPY integrations/mcp-server/src/ ./integrations/mcp-server/src/

# Install only this package's dependencies
RUN pnpm install --frozen-lockfile --filter @tsparticles/mcp-server
RUN pnpm install --frozen-lockfile --filter @tsparticles/mcp-server --ignore-scripts

# Build
RUN pnpm --filter @tsparticles/mcp-server exec tsc

# Prune to production deps only
RUN pnpm --filter @tsparticles/mcp-server deploy --prod /tmp/app
# Copy build output + package.json to a clean directory
RUN mkdir -p /tmp/app && \
cp -r integrations/mcp-server/dist /tmp/app/dist && \
cp integrations/mcp-server/package.json /tmp/app/

FROM node:22-alpine
# tini acts as a proper PID 1: reaps zombie processes and forwards
# signals (SIGTERM/SIGINT) to the Node process so graceful shutdown
# actually runs instead of the container being killed outright.
# Install production deps outside the workspace
WORKDIR /tmp/app
RUN npm install --omit=dev --ignore-scripts

FROM node:24-alpine
RUN apk add --no-cache tini
RUN addgroup --system --gid 1001 app && adduser --system --uid 1001 app
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@
"webpack-cli": "^7.2.1",
"yargs": "^18.0.0"
},
"packageManager": "pnpm@11.10.0"
"packageManager": "pnpm@11.11.0"
}