Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,13 @@ def start_python_server(self, server_path: Path, port: int) -> ProcessInfo:
def start_docker_compose(self, compose_file: Path, port: Optional[int] = None) -> ProcessInfo:
"""Start docker-compose service with optional port configuration"""
platform = sys.platform
# Use instance ID as docker-compose project name for isolation
project_name = f"toolomics_{self.instance_id}"
# Project name must be unique per compose file: workspace-hash isolates
# *this workspace* from other workspaces, and the parent-directory slug
# isolates *this MCP* from sibling MCPs whose compose files declare the
# same service name (e.g. `app`). Sharing a project across MCPs collapses
# them onto the same image tag and container name.
service_slug = compose_file.parent.name.lower().replace('.', '_')
project_name = f"toolomics_{self.instance_id}_{service_slug}"
if platform == "linux":
cmd = ['docker', 'compose', '-p', project_name, '-f', str(compose_file), 'up', '-d']
else:
Expand Down
Loading
Loading