version: '3.8'
services:
hn-mcp:
build:
context: .
dockerfile: Dockerfile
image: karanb192/hn-mcp:latest
container_name: hn-mcp-server
ports:
- "3000:3000"
environment:
# Enable HTTP mode for API access
- HN_MCP_HTTP=true
# Optional: Change port (default 3000)
# - HN_MCP_PORT=8080
# Optional: Disable cache
# - HN_MCP_NO_CACHE=true
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Development service with hot reload
hn-mcp-dev:
profiles: ["dev"]
build:
context: .
target: builder # Use builder stage only
volumes:
- ./src:/app/src
- ./package.json:/app/package.json
- ./tsconfig.json:/app/tsconfig.json
ports:
- "3001:3000"
environment:
- HN_MCP_HTTP=true
- NODE_ENV=development
command: npm run dev
stdin_open: true
tty: true