Dockerfile.smithery•935 B
# Smithery Dockerfile for Home Assistant MCP Server
FROM node:20-slim
# Set working directory
WORKDIR /app
# Copy package files
COPY package.json package-lock.json ./
# Install dependencies (both prod and dev for TypeScript runtime)
RUN npm install
# Copy all source files (Smithery TypeScript runtime needs source)
COPY src ./src
COPY tsconfig.json ./
COPY smithery.config.js ./
# Expose port
EXPOSE 7123
# Health check - note: Smithery runtime will handle the /health endpoint
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
CMD node -e "require('http').get('http://localhost:7123/health', (r) => { process.exit(r.statusCode === 200 ? 0 : 1); })"
# Smithery will use its TypeScript runtime to execute src/smithery.ts
# But for container runtime, we need to build and run the HTTP server
RUN npm run build:http-simple
# Start the simple HTTP server (ESM format)
CMD ["node", "dist/http-simple.mjs"]