Repository navigation
Add single-port combined HTTP+MCP mode (serve-all) for PaaS deployment - #3
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
…ments Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enables running the node on platforms that expose one port with platform-terminated TLS (Fly.io), which is what the live deployment uses.
transport/combined.py:create_combined_app(node, settings)= FastAPI PIP routes +build_mcp_http_app(...)mounted at/, so/mcpis served by MCP while/healthz,/.well-known/pip,/pip/v1/inbox,/metricsstay FastAPI.create_appgainedlifespan=so the MCP session manager's lifespan runs inside the FastAPI app (same bug class fixed in Add production deployment setup (Docker, compose, deploy script, health checks, docs) #2).pip-node serve-allCLI +serve-allentrypoint case.main.pyforuvicorn main:appsource deploys: honorsPORT; derivesPIP_PUBLIC_HTTP_URL/PIP_PUBLIC_MCP_URLfromFLY_APP_NAME; uses/data/instance.key+sqlite:////data/pip.dbwhen a writable/datavolume exists; binds0.0.0.0under a platform proxy (also disables MCP's loopback-only DNS-rebinding Host check, which would otherwise 421 public requests).deploy/fly.toml.example, DEPLOYMENT.md "Single-port / PaaS mode", CHANGELOG 1.2.0; mypy now coversmain.py.Tests:
tests/test_combined.py(combined routing, MCP initialize through the combined app, bearer gating,mainunder Fly env). 126 passed, ruff/mypy clean.Link to Devin session: https://app.devin.ai/sessions/4104d923252c419994b9ebddc2f28bec
Open in Devin Desktop: https://app.devin.ai/desktop/session/4104d923252c419994b9ebddc2f28bec?variant=devin
Requested by: @CommunityPoke