Log in

Monorepo support

If your repository contains multiple services, or if your service lives in a subdirectory rather than at the repository root, you can configure a base directory when creating a service. Forte will treat that directory as the root of your service — analyzing its contents, detecting or generating your build configuration, and building your container image from it.

Setting a base directory

  1. Navigate to your project's Services page and click Create service.
  2. Fill in your repository, branch, and service name.
  3. Open the Advanced configuration section.
  4. In the Base directory field, enter the path to your service's subdirectory — for example, packages/api or services/worker.
  5. Complete the rest of the form and click Create service.

Setting a base directory is currently available through the Forte console only.

What changes when you set a base directory

  • Forte analyzes the files inside your base directory to detect or generate your build configuration.
  • Your container image is built using the base directory as the build context, so relative paths in your Dockerfile (e.g. COPY . /app) resolve correctly within that directory.
  • You can deploy multiple services from the same repository by pointing each service at a different base directory.

If you provide your own Dockerfile, place it inside the base directory and write COPY paths relative to that directory — this is the same behavior you'd get running docker build locally from inside that folder.

Tips and limitations

  • Use a path like packages/api or services/worker. Do not include a leading / or .. segments.
  • If your Dockerfile lives at the root of the base directory (e.g. packages/api/Dockerfile), Forte detects it automatically.

The base directory is set at service creation time and cannot be changed later. To move a service to a different subdirectory, create a new service pointing at the new location.

What's next?

Search

Search documentation and console pages