Dockerfile•977 B
FROM node:20-alpine
# Install tini for proper signal handling
RUN apk add --no-cache tini
# Create app directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci --only=production
# Copy application files
COPY src/ ./src/
COPY scripts/ ./scripts/
COPY generated-tools.json ./
COPY tools-summary.json ./
COPY .env* ./
# Create non-root user for security
RUN addgroup -g 1001 -S mcp && \
adduser -S -u 1001 -G mcp mcp && \
chown -R mcp:mcp /app
USER mcp
# Expose HTTP port for health checks and API
EXPOSE 8092
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD node -e "require('http').get('http://localhost:8092/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"
# Use tini for proper signal handling
ENTRYPOINT ["/sbin/tini", "--"]
# Start comprehensive MCP server in HTTP mode
CMD ["node", "src/comprehensive-http-server.js"]