context7/Dockerfile
arjunkmrm 1de2b52a55 Revert "update port to follow project defaults"
This reverts commit c55bfebb3fc9100cb93ffc73073916c0e34d35db.
2025-05-28 11:26:30 -07:00

37 lines
782 B
Docker

# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# ----- Build Stage -----
FROM node:lts-alpine AS builder
WORKDIR /app
# Copy package and configuration
COPY package.json bun.lock tsconfig.json ./
# Copy source code
COPY src ./src
# Install dependencies and build
RUN npm install && npm run build
# ----- Production Stage -----
FROM node:lts-alpine
WORKDIR /app
# Copy built artifacts
COPY --from=builder /app/dist ./dist
# Copy package.json for production install
COPY package.json ./
# Install only production dependencies
RUN npm install --production --ignore-scripts
# Set default environment variables for HTTP mode
ENV MCP_TRANSPORT=http
ENV PORT=8080
# Expose HTTP port
EXPOSE 8080
# Default command
CMD ["node", "dist/index.js"]