Skip to content

Commit 3a6f819

Browse files
committed
Fix Dockerfile: add venv to PATH for uvicorn
1 parent 2b3b090 commit 3a6f819

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Dockerfile.mcp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ RUN pip install uv
1515
COPY pyproject.toml uv.lock README.md ./
1616
COPY src/ ./src/
1717

18-
# Install dependencies
19-
RUN uv sync --no-dev
18+
# Install dependencies (include all, not just non-dev)
19+
RUN uv sync
2020

2121
# Set environment variables
2222
ENV ENVIRONMENT=production
23-
24-
# The PORT is set by Railway
2523
ENV PORT=8080
2624

25+
# Add virtual environment to PATH
26+
ENV PATH="/app/.venv/bin:$PATH"
27+
2728
# Expose port (Railway sets this dynamically)
2829
EXPOSE 8080
2930

30-
# Run the MCP HTTP server
31-
# Railway sets PORT env var, default to 8080
32-
CMD sh -c "uv run uvicorn rosetta.api.mcp_http:app --host 0.0.0.0 --port \${PORT:-8080}"
31+
# Run the MCP HTTP server directly using the venv python
32+
CMD ["sh", "-c", "python -m uvicorn rosetta.api.mcp_http:app --host 0.0.0.0 --port ${PORT:-8080}"]

0 commit comments

Comments
 (0)