Files
tarot-mcp/Dockerfile
Morax cfe75ffb2b feat: Implement Tarot session management and reading spreads
- Added TarotSessionManager class to manage tarot reading sessions, including session creation, retrieval, reading addition, and cleanup of old sessions.
- Defined various tarot spreads in a new spreads module, including single card, three card, Celtic cross, and more, with detailed descriptions and meanings for each position.
- Created core types for tarot cards, readings, and sessions in a new types module to structure data effectively.
- Configured TypeScript settings in tsconfig.json for improved development experience and compatibility.
2025-07-28 20:29:58 +08:00

36 lines
813 B
Docker

# Use Node.js 18 Alpine for smaller image size
FROM node:18-alpine
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci --only=production
# Copy source code
COPY . .
# Build the TypeScript code
RUN npm run build
# Create non-root user for security
RUN addgroup -g 1001 -S nodejs
RUN adduser -S tarot -u 1001
# Change ownership of the app directory
RUN chown -R tarot:nodejs /app
USER tarot
# Expose port 3000
EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:3000/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"
# Default command - run HTTP server
CMD ["node", "dist/index.js", "--transport", "http", "--port", "3000"]