Deploying
Monorepo Support
Deploy services from subdirectories in a monorepo
Ink supports deploying multiple services from subdirectories within a single repository. Each subdirectory becomes its own service with independent builds, resources, and URLs.
Root directory
Set root_directory to the path of your service within the repo. For example, if your repo looks like:
my-monorepo/
├── frontend/
│ └── package.json
├── backend/
│ └── package.json
└── shared/Your agent deploys each subdirectory as a separate service, pointing them at the same repo with different root_directory values:
Tool Call
create_service(
"name": "backend",
"repo": "ink/my-monorepo",
"root_directory": "backend",
"port": "8080",
"memory": "512Mi"
)Tool Call
create_service(
"name": "frontend",
"repo": "ink/my-monorepo",
"root_directory": "frontend",
"port": "3000",
"memory": "256Mi",
"env_vars": {
"NEXT_PUBLIC_API_URL": "https://backend.ml.ink"
}
)Each service gets its own URL, build pipeline, and resource allocation — all from one repo.
How it works
- Ink clones the full repository
- The build runs from the specified subdirectory
- Auto-detection and build commands are relative to that directory
- Each service deploys and scales independently
Limitations
- The
root_directorymust be a relative path within the repo - Parent directory traversal (
..) is not allowed