Skip to main content
A repository holding more than one app deploys as several services. Each one tracks its own state — its own deploys, status, URL and history — so a push starts a separate deployment per service and a broken build in one leaves the others serving. Two fields control the build: rootDir sets where a service builds from, and buildFilter decides whether a push rebuilds the repository’s services at all.

Setting a root directory

rootDir is the directory a service builds from. Paths inside the service, including dockerfilePath and publish, are relative to it.
slipway.yaml
If you omit rootDir on a service that builds, it defaults to the repository root. dockerContext narrows the Docker build context below rootDir, for the case where the Dockerfile needs to see less than the whole directory.

Rebuilding only what changed

By default, a push to the tracked branch redeploys every service in the source that has auto-deploy on, whichever files changed. A buildFilter restricts that to pushes which touch files you care about.
slipway.yaml
At least one of the two must be non-empty. A block declaring neither fails validation, and so does an empty or whitespace-only pattern, or one that is not a valid glob.

How a push is evaluated

A changed file is relevant when it matches paths (or paths is empty) and matches no entry in ignoredPaths. If a push contains no relevant file, the auto-deploy is skipped.
Build filter paths are always relative to the repository root, even when the service sets a rootDir. A service with rootDir: backend still needs backend/**, not **.
A manual deploy always runs. Build filters only affect what a push triggers, so you are never locked out of deploying.

A worked layout

For a repository shaped like this:
Give each service a rootDir, and set the filter so a change to shared/ rebuilds both:
slipway.yaml

Several repositories in one project

A project is not limited to one repository. Add a source per repo and they deploy together into the same network, reaching each other by service name. See Projects. Sources added this way default to auto-deploy off, so turn it on per source when you want pushes to redeploy them.

FAQ

Does a build filter save money? Yes. A skipped build runs no build machine, so a push that touches only documentation costs nothing. Can two services share a rootDir? Yes. Two services can build from the same directory with different Dockerfiles or targets.