Builds and images

Select Railpack, Nixpacks, Dockerfile, or prebuilt container images, configure monorepo paths, and understand build-time OpenTelemetry.

Repository deployments build an image directly from a resolved commit on GitHub, GitLab, Bitbucket, or Azure DevOps. Prebuilt image deployments pull an existing registry artifact and skip source compilation.

Choose a builder

Tabs

Railpack (default)

Use Railpack for automatic language and framework detection with optional build-time OpenTelemetry instrumentation for supported runtimes (Go, Node.js 18.19+, Python 3.10+, Java, .NET 8+).

  • Settings: Optionally customize Directory (for monorepos), Railpack config file path, Build command, and Start command.
  • Tracing merge behavior: When Tracing is on (the default), Formatio writes .formatio/railpack.json into the build copy of your repo, merging your own Railpack config without overwriting any rules you set.
  • No failed builds from instrumentation: Build logs report either formatio: tracing compiled in / formatio: tracing added with <package> or building without tracing instrumentation: <reason> without failing your build.

Dockerfile

Use Dockerfile when your repository defines its own multi-stage container build or system dependencies.

  • Settings: Specify Dockerfile path and Build context relative to the repository root:
Dockerfile: apps/api/Dockerfile
Build context: .
  • Context boundaries: Docker COPY instructions can only read paths inside Build context. Keep .git and secrets excluded via .dockerignore.
  • OpenTelemetry: Dockerfile builds are not preloaded automatically; add a lightweight 2–3 line Formatio SDK hook from tracing setup and SDKs.

Nixpacks

Use Nixpacks when an existing repository relies on Nixpacks conventions or nixpacks.toml.

  • Settings: Configure Directory relative to the repository root.
  • OpenTelemetry: Add the lightweight Formatio SDK for your language (Go, Node.js, Next.js, Python, Java, .NET).
  • Secret caveat: Current Nixpacks builds pass env options into build image configuration; prefer Railpack or Dockerfile with BuildKit secrets for build-time credentials. See environment and secrets.

Custom image

Use Custom image when CI or a vendor publishes an already-built container image to a registry accessible by your platform configuration.

  • Settings: Supply a reproducible immutable tag or digest such as ghcr.io/acme/worker@sha256:... instead of a mutable :latest tag.
  • Runtime requirements: Include /bin/sh if the application uses runtime secret wrapper injection, and define an explicit ENTRYPOINT or CMD.

Monorepo directories and listening ports

  • Subdirectories: Leave Directory blank when your app lives at the repository root. For a monorepo package in apps/api, enter apps/api.
  • Bind all interfaces: Web services must listen on 0.0.0.0 at the container port configured in networking. Setting an HTTP route does not override your server's listening port inside the container.

[!NOTE] If a language uses custom compiler or shell flags such as GOFLAGS or BASH_ENV, Railpack skips automatic OTel injection safely (building without tracing instrumentation: <reason>). See lightweight OpenTelemetry setup.

Verify a build

  1. Open the application's Logs tab, select Build, and choose the deployment attempt.
  2. Scan from the first failing step rather than only the final exit code—confirm working directory, lockfiles, secret availability, and registry permissions.
  3. Confirm runtime startup separately in Runtime logs once rollout starts.

Further reading