Monorepos & Root Directory
If your repository contains multiple services — a frontend and a backend in the same repo, for example — you can deploy each as a separate Vessl app by pointing each one at a different subfolder.
Setting the Root Directory
During app creation, in the Source step, there's a Root Directory field. Enter the path to the subfolder you want to deploy, relative to the repository root:
backend
apps/api
packages/web
Leave it empty to use the repository root (the default for single-app repos).
Vessl resolves everything relative to this path:
- Nixpacks detection — looks for
package.json,composer.json,requirements.txt, etc. inside the root directory. - Dockerfile path — if you specify a Dockerfile, its path is relative to the root directory.
- Build context — only the contents of the root directory are sent as the build context.
Example: frontend + backend in one repo
Say your repo looks like this:
my-app/
├── frontend/ ← Next.js
└── backend/ ← Laravel
Create two Vessl apps from the same GitHub repository:
| App | Root Directory | Result |
|---|---|---|
my-app-frontend | frontend | Builds and deploys the Next.js app |
my-app-backend | backend | Builds and deploys the Laravel app |
Each app deploys independently. Pushing to the repo triggers auto-deploy for both (if auto-deploy is enabled on both).
Changing the Root Directory later
You can update the Root Directory from your app's Settings → Build section. The change takes effect on the next deploy.