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
(
  : "backend",
  : "ink/my-monorepo",
  : ,
  : "8080",
  : "512Mi"
)
Tool Call
(
  : "frontend",
  : "ink/my-monorepo",
  : ,
  : "3000",
  : "256Mi",
  : {
    "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_directory must be a relative path within the repo
  • Parent directory traversal (..) is not allowed

On this page