Unbind

Builds

How Unbind turns your code into something it can run.

A service created from GitHub is built before it runs. You pick the builder under Build in the service settings, or under Advanced Settings before the first deployment.

Railpack

Railpack is the default. It reads your repository, works out the language and framework, and builds it with no Dockerfile. It handles most Node.js, Python, Go, PHP, Ruby, Java and Rust apps, and static sites.

When it guesses wrong, override it:

SettingWhat it isExample
Install CommandInstalls dependenciespnpm install --frozen-lockfile
Build CommandBuilds the apppnpm --filter web build
Start CommandStarts the apppnpm --filter web start

Railpack's docs cover what it detects and how to configure it from inside the repository.

Docker

If your repository has a Dockerfile, pick Docker.

SettingWhat it isDefault
Dockerfile PathWhere the Dockerfile is./Dockerfile
Build ContextThe folder the build can see./
Start CommandOverrides the image's commandnone

In a monorepo, point Dockerfile Path at apps/api/Dockerfile and leave Build Context at the root if the Dockerfile copies files from other folders.

Variables during the build

The service's variables are available while it builds, not only while it runs. Frameworks that bake values into the bundle at build time, like VITE_* or NEXT_PUBLIC_* variables, work without extra setup on Railpack.

With the Docker builder, a variable reaches the build only if the Dockerfile declares it:

ARG VITE_API_URL
RUN npm run build

The same goes for UNBIND_GIT_SHA and UNBIND_GIT_BRANCH, the commit being built. See Git commit.

The build queue

Builds run on your servers, and by default two run at a time. The rest wait in a queue. While a service has a build waiting, a newer one for the same service replaces it, so only the latest push gets built. A newer build also stops one that is already running, and starts once it has stopped.

Each deployment builds exactly the commit it shows, even when newer commits land on the branch before its build starts.

With the self-hosted registry, new builds also wait while it deletes old images to free space. Builds that are already running finish first. See Registry.

Someone who manages the instance can raise the limits under System Settings.

Build cache

Builds reuse layers from earlier builds, which makes them much faster. Each service keeps its own cache. Changing a variable reruns only the steps that use it, not the whole build. If a build behaves strangely and you suspect the cache, redeploy with Skip cache turned on. See Deployments.

Build logs

Open a deployment and choose Build Logs to see the full output. When a build fails, the reason is almost always in the last lines.

On this page