-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (26 loc) · 981 Bytes
/
Dockerfile
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
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use the official Node.js image as the base image
FROM node:20-alpine AS builder
# Set the working directory inside the container
WORKDIR /app
# Copy package.json and package-lock.json to the working directory
COPY package.json package-lock.json ./
# Install dependencies
RUN npm install
# Copy the entire project to the working directory
COPY . .
# Build the TypeScript project
RUN npm run build
# Use a minimal Node.js image for the production stage
FROM node:20-alpine AS production
# Set the working directory inside the container
WORKDIR /app
# Copy the built files and package.json to the production image
COPY --from=builder /app/build ./build
COPY --from=builder /app/package.json ./
# Install only production dependencies
RUN npm install --only=production
# Expose the port that the server listens on
EXPOSE 3000
# Command to run the MCP server
CMD ["node", "build/index.js"]