ConceptsBuilds & runtimes
Root directory
The root directory is the folder of the repository where Ferry builds the service.
A monorepo has many apps. --root-dir chooses the folder of one app.
1 / 3
A monorepo needs a root directory. The root directory becomes the build context of Docker.
Set the root directory
ferry create api --repo https://github.com/you/monorepo --root-dir services/apiIn a blueprint, the field is rootDir. The path must be relative and in the repository.
==> Using root directory ./services/apiWhat starts from the root directory
All other paths are relative to the root directory:
- the files of the runtime detection
- the Dockerfile path
- the
Procfile - the publish directory
If the build needs files outside
Examples are a shared library or design tokens. Build from the repository root, and use cd in your build command.
ferry update docs --build-cmd "cd docs && npm ci --include=dev && npm run build" --publish-dir docs/out