diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5f78e2a --- /dev/null +++ b/Dockerfile @@ -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 UPSTASH_EMAIL=your-email@example.com +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"]