From 5b5453e71e60b398947ffde65df2e0b4e2d0465d Mon Sep 17 00:00:00 2001 From: Tyler Lafleur Date: Fri, 19 Sep 2025 21:49:41 -0500 Subject: [PATCH] Add Dockerfile for Railway MCP server deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Create custom Dockerfile to properly build and deploy MCP server - Simplify railway.json to rely on Dockerfile configuration - Ensure mcp_server directory and dependencies are correctly handled - Set proper PYTHONPATH and port configuration for Railway 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- Dockerfile | 24 ++++++++++++++++++++++++ railway.json | 4 ---- 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..252dafc9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM python:3.10-slim + +# Set working directory +WORKDIR /app + +# Install uv for dependency management +RUN pip install uv + +# Copy the entire project +COPY . . + +# Install dependencies for the MCP server +WORKDIR /app/mcp_server +RUN uv sync + +# Set environment variables +ENV PORT=8080 +ENV PYTHONPATH=/app:/app/mcp_server + +# Expose port for Railway +EXPOSE 8080 + +# Run the MCP server +CMD ["uv", "run", "graphiti_mcp_server.py", "--transport", "sse", "--host", "0.0.0.0", "--port", "8080"] \ No newline at end of file diff --git a/railway.json b/railway.json index fae12493..290b021a 100644 --- a/railway.json +++ b/railway.json @@ -1,10 +1,6 @@ { "$schema": "https://railway.app/railway.schema.json", - "build": { - "buildCommand": "cd mcp_server && uv sync" - }, "deploy": { - "startCommand": "cd /app/mcp_server && uv run graphiti_mcp_server.py --transport sse --host 0.0.0.0 --port 8080", "restartPolicyType": "on_failure", "restartPolicyMaxRetries": 10 }