Skip to content

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.

Set spec.build.strategy to one of:

StrategyWhat it does
auto (default)Detect the runtime and build with Railpack — no Dockerfile needed
railpackForce the Railpack builder (zero-config, per-runtime)
dockerfileBuild from a Dockerfile you provide
fluxnow.yaml
spec:
runtime: node
port: 3000
build:
strategy: railpack

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 start

This is what lets a monorepo app build via Railpack by selecting one workspace package’s commands, without writing a 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 context
  • dockerfile — path to the Dockerfile. A bare filename resolves against the app’s path; a path containing / is treated as repo-root-relative.
  • context — the directory passed to docker build. Use . (repo root) for workspace monorepos whose Dockerfile copies root lockfiles / sibling packages, or the app’s own path for self-contained apps.

Between the build and the rollout, FluxNow runs an optional release command — most commonly database migrations. Set it with spec.release:

fluxnow.yaml
spec:
runtime: node
release: bun run db:migrate

It 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).

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:

fluxnow.yaml
deploy:
auto: false

Preview environments are generated per pull request by default. Opt out for a repo with:

fluxnow.yaml
preview:
enabled: false

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.