Switch to Railway Python buildpack: fix uv.lock and remove Docker forcing

PROBLEM SOLVED:
- Fixed uv.lock sync error by regenerating lockfile
- Railway now uses Python buildpack instead of fighting Docker auto-detection

CHANGES:
- Updated mcp_server/uv.lock to sync with pyproject.toml
- Removed Docker forcing files (Dockerfile, nixpacks.toml, .dockerignore)
- Updated railway.json for Python buildpack with proper start command
- Simplified approach: let Railway handle Python environment naturally

DEPLOYMENT:
- Build: 'cd mcp_server && uv sync'
- Start: 'cd mcp_server && uv run graphiti_mcp_server.py --transport sse'
- Should deploy in ~2-3 minutes with Python buildpack

🚀 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Tyler Lafleur 2025-09-19 20:11:05 -05:00
parent 6a11643a94
commit 88ebb6849c
6 changed files with 425 additions and 506 deletions

View file

@ -1,32 +0,0 @@
# Exclude files that don't need to be in the Docker build context
.git
.gitignore
.github/
*.md
!README.md
.env*
!.env.example
.venv/
__pycache__/
*.pyc
*.pyo
*.pyd
.pytest_cache/
.coverage
htmlcov/
.tox/
.mypy_cache/
.DS_Store
node_modules/
*.log
tests/
docs/
images/
signatures/
depot.json
ellipsis.yaml
conftest.py
pytest.ini
docker-compose*.yml
uv.lock
poetry.lock

View file

@ -1,36 +0,0 @@
# 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"]

845
mcp_server/uv.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,7 +0,0 @@
# Force Railway to use Dockerfile instead of auto-detection
[variables]
NIXPACKS_NO_CACHE = 'true'
# Explicitly disable nixpacks to force Docker usage
[phases.build]
cmds = ["echo 'Using Dockerfile - nixpacks disabled'"]

View file

@ -1,12 +1,10 @@
{ {
"$schema": "https://railway.app/railway.schema.json", "$schema": "https://railway.app/railway.schema.json",
"build": { "build": {
"builder": "dockerfile", "buildCommand": "cd mcp_server && uv sync"
"dockerfilePath": "Dockerfile",
"buildArgs": {}
}, },
"deploy": { "deploy": {
"numReplicas": 1, "startCommand": "cd mcp_server && uv run graphiti_mcp_server.py --transport sse",
"restartPolicyType": "on_failure", "restartPolicyType": "on_failure",
"restartPolicyMaxRetries": 10 "restartPolicyMaxRetries": 10
} }

View file

@ -1,5 +0,0 @@
# Railway-compatible requirements for Graphiti MCP Server
mcp>=1.5.0
openai>=1.68.2
azure-identity>=1.21.0
python-dotenv