> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blaxel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy multiple resources

> Deploy multiple batch jobs with shared context from a mono-repo.

You can use a **shared context from a same single repository** to deploy multiple resources, mixing [batch jobs](Overview), [agents](../Agents/Overview), [MCP servers](../Functions/Overview), 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:

```text theme={null}
myrepo
|- myjob
    |- src
    |- blaxel.toml
    |- Dockerfile
|- myagent
    |- src
    |- blaxel.toml
    |- Dockerfile
|- myotheragent
    |- src
    |- blaxel.toml
    |- Dockerfile
|- mymcpserver
    |- src
    |- blaxel.toml
    |- Dockerfile
|- shared
    |- sharedfile
```

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` with`COPY myagent/src src`

This allows you to reference shared resources:

```dockerfile theme={null}
COPY myagent/src src
COPY shared shared
```

### Deploy

To deploy, run these commands from the root folder:

```bash theme={null}
bl deploy -d myjob
bl deploy -d myagent
bl deploy -d myotheragent
bl deploy -d mymcpserver
```

For a complete example, see our [sample repository](https://github.com/drappier-charles/multiagent).
