Repository navigation
chore(monorepo): give the MCP server its own compose project - #22
Merged
Merged
Conversation
The MCP server was a service in the backend's compose files, so a change to its configuration only reached production with a backend release. Move it to apps/mcp-server/docker-compose.yml with its own .env, joining the backend's Docker network (now with a fixed name) as an external network. The MCP deploy uploads, validates and swaps in its compose file from its own release tag, like the backend deploy does.
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
apps/mcp-server/docker-compose.yml(projectbitfinance-mcp) and.env.prod.example. The MCP server service moves out ofapps/backend/docker-compose.prod.yml, and its variables move out of the backend's.env.prod.example.bitfinance_bitfinance-network, now set explicitly. The MCP project joins it as an external network and still reaches the API athttp://bitfinance-api:8080.depends_ondropped: it can't cross compose projects. The MCP server only calls the API when it handles a request, so it starts fine without it.DEPLOY_PATH/mcp-server. Like the backend deploy, it uploads the compose file from its own release tag, checks it against that directory's.env(failing on unset variables) and swaps it in, keepingdocker-compose.yml.prev.docs/deployment.mdand the MCP README describe the two projects.The backend and MCP deploys no longer share files or variables. Each deploys and rolls back on its own, and the MCP project no longer receives the backend's secrets.
Testing
.env. With every variable set it swaps the file. WithMCP_BEARER_TOKENmissing it fails and leaves the current file in place..envfiles: the backend config no longer references the MCP server, and the MCP config joins the external network.Rollout
The MCP container moves between compose projects once, by hand, before the next MCP release.