Deploy multiple resources
Deploy multiple resources with shared context from a mono-repo.
You can use a shared context from a same single repository to deploy multiple resources, mixing agents, MCP servers, batch jobs, etc.
Deploying multiple resources
With the --directory
(-d
) parameter in bl deploy
, you can specify a subfolder containing your blaxel.toml
and Dockerfile
.
The Dockerfile
defines how your deployment context is built and as such is required if you want to ensure proper mounting of shared dependencies between your different services.
This enables such mono-repo structure with shared libraries:
No changes are required to your blaxel.toml
. However, in your Dockerfile
, paths must be relative to the root context. For example, replace COPY src src
withCOPY myagent/src src
This allows you to reference shared resources:
Deploy
To deploy, run these commands from the root folder:
For a complete example, see our sample repository.