Builds
An app is built from its repository on its own server, by the BuildKit inside Docker. What builds it:
- Its Dockerfile, when the repository has one at the top.
- Yawl’s builder for Go (
go.mod), Node (package.json, a Vite site served as files) and Python (requirements.txtorpyproject.toml). - Railpack for everything else: Ruby, PHP, Java, Rust, Elixir, Deno, a folder of HTML, and the other languages Railpack knows. It reads the language and its version from the repository.
builder: railpack sends an app to Railpack even when it has a Dockerfile or is Go, Node or Python. On the page: Settings, Build with Railpack.
services:
- name: shop
kind: web
repo: https://github.com/acme/shop
port: 8080
builder: railpack
The app listens on PORT, as every web service does.
Railpack
- Yawl uses Railpack v0.43.0 and moves it with Yawl’s own releases. The Railpack program is checked against its published checksum, and its build images are named by digest, so a moved tag changes nothing.
- Railpack’s planning step runs inside a build container, not on the server itself. It needs the internet, as a build does.
- Variables marked build time reach the build as secrets: never written into the image or the build log. A changed value rebuilds what reads it. Railpack reads them while it plans too, so its own settings (
RAILPACK_*) and the ones it looks at (DB_CONNECTIONfor PHP) must be marked build time. - When Railpack cannot tell how to build the repository, the deploy fails with Railpack could not plan this repository: and Railpack’s own reason. Add a Dockerfile then.
A build server
Integrations, Builds can send every git build to one server, so the others keep their CPU and memory for their apps and the build cache stays warm in one place.
- Add a login for your registry in Integrations, Registries that may push (for GitHub’s: a token with
write:packages). - In Integrations, Builds, pick the server to build on and the repository to push to, like
ghcr.io/acme/builds.
A deploy’s build then runs on that server, which pushes ghcr.io/acme/builds:<deploy id> and keeps no copy; the service’s own server pulls it in the same step. Yawl does not delete what it pushed: set a retention rule in the registry.
- A service with build variables still builds on its own server, and the deploy says so: the variables are sealed to that server.
- The build server builds for its own CPU kind (amd64 or arm64). A server of the other kind cannot run what it built.
- Choose Each server builds its own to go back.