Dockerfile.smithery•962 B
# Smithery Deployment Dockerfile for Greptile MCP Server
FROM node:18-alpine
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apk add --no-cache git
# Copy package files
COPY package*.json ./
COPY tsconfig.json ./
COPY tsup.config.ts ./
# Install all dependencies for build
RUN npm ci
# Copy source code
COPY src ./src
# Build the TypeScript application
RUN npm run build
# Remove dev dependencies
RUN npm prune --production
# Create non-root user
RUN addgroup -g 1001 -S nodejs && \
adduser -S mcp -u 1001
# Change ownership of the app directory
RUN chown -R mcp:nodejs /app
USER mcp
# Expose port for HTTP transport
EXPOSE 8080
# Environment variables
ENV NODE_ENV=production
ENV PORT=8080
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD node -e "console.log('Health check passed')" || exit 1
# Start the MCP server via Smithery entry point
CMD ["node", "dist/smithery.js"]