MAJOR CHANGES: - Replace complex uv-based Dockerfile with simple pip-only approach - Add requirements.txt for standard Python dependency management - Remove all uv commands that might trigger cache mount behavior - Add .dockerignore for clean Railway build context - Add nixpacks.toml to force Dockerfile usage (disable auto-detection) - Update railway.json with explicit Docker configuration PROBLEM SOLVED: Railway 'Cache mount ID is not prefixed with cache key' error should be resolved by eliminating all potential sources of cache mount directives. DEPLOYMENT STRATEGY: - Single-stage Docker build using standard pip - Install graphiti-core from source with 'pip install .' - Install MCP dependencies with 'pip install -r requirements.txt' - No complex build tools or caching mechanisms - Explicit Railway Docker configuration 🚀 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
36 lines
No EOL
851 B
Docker
36 lines
No EOL
851 B
Docker
# Ultra-simple Railway-compatible Dockerfile for Graphiti MCP Server
|
|
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
gcc \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy the entire project
|
|
COPY . .
|
|
|
|
# Install graphiti-core from source using standard pip
|
|
RUN pip install --no-cache-dir .
|
|
|
|
# Install MCP server dependencies using standard pip
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Create non-root user
|
|
RUN groupadd -r app && useradd -r -d /app -g app app
|
|
RUN chown -R app:app /app
|
|
|
|
# Switch to non-root user
|
|
USER app
|
|
|
|
# Set environment variables for Railway
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV PORT=8000
|
|
|
|
# Expose port
|
|
EXPOSE $PORT
|
|
|
|
# Change to MCP server directory and run
|
|
WORKDIR /app/mcp_server
|
|
CMD ["python", "graphiti_mcp_server.py", "--transport", "sse"] |