Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment: Dockerfile #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
41 changes: 41 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use a Node.js image as the base
FROM node:18-alpine AS builder

# Set working directory
WORKDIR /app

# Copy package.json and package-lock.json for npm ci
COPY package.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application code
COPY . .

# Build the TypeScript project
RUN npm run build

# Prepare the production image
FROM node:18-alpine AS release

# Set working directory
WORKDIR /app

# Copy only the necessary files from the builder
COPY --from=builder /app/dist /app/dist
COPY --from=builder /app/package.json /app/package.json

# Install only production dependencies
RUN npm ci --only=production

# Set environment variables for Upstash
ENV [email protected]
ENV UPSTASH_API_KEY=your-upstash-api-key

# Expose the necessary ports (if any specific ports are required)
EXPOSE 3000

# Command to run the MCP server
ENTRYPOINT ["node", "dist/index.js", "run", "$UPSTASH_EMAIL", "$UPSTASH_API_KEY"]