feat: Add deployment scripts, Docker configuration, and documentation for Cloud MCP project

This commit is contained in:
ethan.chen
2026-01-07 13:54:32 +08:00
parent 47ecc40186
commit 6ab690fa40
10 changed files with 942 additions and 0 deletions

42
Dockerfile Normal file
View File

@@ -0,0 +1,42 @@
# Dockerfile for Cloud MCP Server
FROM oven/bun:1 AS base
WORKDIR /app
# Copy package files
COPY package.json bun.lockb* ./
# Install dependencies
RUN bun install --frozen-lockfile
# Copy source code
COPY . .
# Build the project
RUN bun run build
# Production stage
FROM oven/bun:1-slim
WORKDIR /app
# Copy package files and install production dependencies
COPY package.json bun.lockb* ./
RUN bun install --frozen-lockfile --production
# Copy built files from base stage
COPY --from=base /app/dist ./dist
COPY --from=base /app/src ./src
# Create data directory for persistent storage
RUN mkdir -p /app/data
# Expose port (if needed for health checks)
EXPOSE 3000
# Set environment variables
ENV NODE_ENV=production
# Run the MCP server
CMD ["bun", "run", "src/index.ts"]