FlowFlow

Deploying

A deployment in Flow is one build-and-release of a service. You'll get plenty of these without ever thinking about them, push to your branch and one just happens, but it's worth understanding the handful of buttons on a service's General tab, because they don't all do the same thing, and picking the right one saves you a wasted build.

The buttons, and when to reach for each

  • Deploy: builds and releases the current state of your connected branch (or addon config). This is the one you use the first time, or any time autodeploy is off and you want to ship what's currently on the branch.
  • Reload: doesn't build anything new at all. It asks the agent to restart the already-running container or process in place. Reach for this after changing environment variables, or if something just needs a restart, it's the fastest option precisely because it skips the build step entirely.
  • Rebuild: builds again from the exact same commit your last deployment used, without needing a new push. Handy if a build failed for an unrelated reason (a flaky dependency download, for instance) and you just want to try again, or if you changed a build setting and want it applied without waiting for new code.
  • Rollback: found on the Deployments tab rather than General, next to any past deployment that has a commit attached. It creates a new deployment that rebuilds that older commit, your history keeps growing forward rather than rewriting itself, which means rolling back is itself something you could roll back from later.
  • Stop: takes the service down without touching its deploy history or configuration. Start it again whenever you're ready, no rebuild required unless you specifically want one.

Deploy, Rebuild, and Rollback are disabled where they wouldn't make sense, Deploy needs either a Git connection or an addon configuration to build from, and Rebuild and Rollback need a commit to build from in the first place.

What a deployment goes through

A deployment moves through a small set of statuses as it runs: Pending (queued, waiting for the agent to pick it up), Building, Deploying (build succeeded, now starting the container or process), and then either Running or Failed. A service you've stopped shows its last deployment as Stopped. While anything is mid-flight, the service page refreshes on its own every couple of seconds so you're not stuck hitting reload waiting for a build to finish.

How your code actually gets built

For Docker-runtime services, you choose a build type on the General tab:

  • Nixpacks is the default, and it's worth starting there: it detects what kind of project you have, Node, Python, Go, and plenty of others, and builds a working image without you writing a Dockerfile at all.
  • Dockerfile hands full control back to you, Flow just builds whatever Dockerfile is in your repo.
  • Static switches the service over to the static runtime, build once with a build command, serve the output directory as files, no long-running process at all.

There's also a clean cache toggle on the General tab, on by default Docker reuses layers from previous builds to keep things fast. Turn this on for one deploy if you suspect a stale cached layer is the reason something isn't picking up a change it should have.

Watching it happen

Every deployment keeps its full build and runtime output, see Logs and the terminal for where to find it and how it's laid out.