MCP-MySQL Server

# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile # Stage 1: Build FROM node:20-alpine AS builder # Set the working directory WORKDIR /app # Copy package files and install dependencies COPY package.json package-lock.json ./ RUN npm install # Copy the entire source directory COPY src ./src # Copy the TypeScript configuration COPY tsconfig.json ./ # Compile TypeScript to JavaScript RUN npm run build # Stage 2: Production FROM node:20-alpine # Set the working directory WORKDIR /app # Copy compiled files from the builder stage COPY --from=builder /app/build ./build # Copy necessary package files COPY package.json package-lock.json ./ # Install production dependencies only RUN npm install --production # Set environment variables for database configuration ENV NODE_ENV=production # Specify the command to run the MCP server ENTRYPOINT ["node", "build/index.js"]