Builds & Deploy
FluxNow builds a container image from your app’s source on every push. You control how
with spec.build in fluxnow.yaml. Nothing is required — with no build block, FluxNow
auto-detects the runtime and builds with Railpack.
Build strategies
Section titled “Build strategies”Set spec.build.strategy to one of:
| Strategy | What it does |
|---|---|
auto (default) | Detect the runtime and build with Railpack — no Dockerfile needed |
railpack | Force the Railpack builder (zero-config, per-runtime) |
dockerfile | Build from a Dockerfile you provide |
spec: runtime: node port: 3000 build: strategy: railpackRailpack (zero-config)
Section titled “Railpack (zero-config)”Railpack inspects your source and produces an optimized image for your runtime (Node,
Go, Python, Ruby, PHP, Rust, Bun, and more) — no Dockerfile required. You can nudge it
with buildCommand and startCommand:
spec: build: strategy: railpack buildCommand: pnpm --filter @scope/app build startCommand: pnpm --filter @scope/app startThis is what lets a monorepo app build via Railpack by selecting one workspace package’s commands, without writing a Dockerfile.
Dockerfile
Section titled “Dockerfile”Bring your own Dockerfile for full control:
spec: build: strategy: dockerfile dockerfile: Dockerfile # relative to the app path (or repo root) context: . # docker build contextdockerfile— path to the Dockerfile. A bare filename resolves against the app’spath; a path containing/is treated as repo-root-relative.context— the directory passed todocker build. Use.(repo root) for workspace monorepos whose Dockerfile copies root lockfiles / sibling packages, or the app’s ownpathfor self-contained apps.
Release command (runs before deploy)
Section titled “Release command (runs before deploy)”Between the build and the rollout, FluxNow runs an optional release command — most
commonly database migrations. Set it with spec.release:
spec: runtime: node release: bun run db:migrateIt runs as a pre-deploy step using your built image, with the same env and secrets as your
app, and a non-zero exit halts the deploy (the current version keeps serving). FluxNow
also auto-detects one from a Procfile or your framework. Full details, including the
auto-detected defaults per framework, are in
Release command (migrations).
Deploy control
Section titled “Deploy control”By default, a push to your default branch builds the image and rolls it out. To build and push the image but hold the rollout (bump the tag / promote manually), set:
deploy: auto: falsePreview control
Section titled “Preview control”Preview environments are generated per pull request by default. Opt out for a repo with:
preview: enabled: falseMonorepos
Section titled “Monorepos”Each app in a monorepo has its own spec.build, so different apps can use different
strategies (a Railpack Node API next to a Dockerfile-built Go worker). See
Monorepo Support.