-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
39 lines (28 loc) · 1.1 KB
/
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
38
39
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use the imbios/bun-node image as the base image with Node and Bun
# Keep bun and node version in sync with package.json
FROM imbios/bun-node:1.1.38-18-alpine AS builder
# Set the working directory in the container
WORKDIR /app
# Copy package.json and package-lock.json
COPY package.json package-lock.json ./
# Copy the entire project to the working directory
COPY . .
# Install the dependencies and devDependencies
RUN npm install
# Build the project
RUN npm run build
# Use a smaller base image for the final image
FROM node:18-alpine AS release
# Set the working directory
WORKDIR /app
# Copy only the necessary files from the builder stage
COPY --from=builder /app/dist /app/dist
COPY --from=builder /app/package.json /app/package.json
COPY --from=builder /app/package-lock.json /app/package-lock.json
# Install only production dependencies
RUN npm ci --omit=dev
# Define environment variables
ENV NODE_ENV=production
# Specify the command to run the MCP server
ENTRYPOINT ["node", "dist/index.js", "start", "$NEON_API_KEY"]