Skip to content

chore(monorepo): give the MCP server its own compose project - #22

Merged
gustmrg merged 2 commits into
mainfrom
chore/split-mcp-compose
Oct 11, 2026
Merged

gustmrg merged 2 commits into
mainfrom
chore/split-mcp-compose

Conversation

@gustmrg

@gustmrg gustmrg commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • New apps/mcp-server/docker-compose.yml (project bitfinance-mcp) and .env.prod.example. The MCP server service moves out of apps/backend/docker-compose.prod.yml, and its variables move out of the backend's .env.prod.example.
  • Network: the backend network keeps the name it already has, bitfinance_bitfinance-network, now set explicitly. The MCP project joins it as an external network and still reaches the API at http://bitfinance-api:8080.
  • depends_on dropped: it can't cross compose projects. The MCP server only calls the API when it handles a request, so it starts fine without it.
  • MCP deploy: it now works in 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, keeping docker-compose.yml.prev.
  • Docs: docs/deployment.md and 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

  • I extracted the new MCP validation and swap block and ran it against a sample .env. With every variable set it swaps the file. With MCP_BEARER_TOKEN missing it fails and leaves the current file in place.
  • I rendered both projects with their example .env files: 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.

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.
@gustmrg
gustmrg merged commit dea058a into main Oct 11, 2026
4 checks passed
@gustmrg
gustmrg deleted the chore/split-mcp-compose branch October 11, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant