Instant configuration change: possible without image rebuild?

Hey all! Loving Fly, using it in prod for 3 products now (soon 4!) <3

Just wondering if it’s possible to make changes to fly.toml and deploy them immediately. Currently, it seems that if I change an environment variable’s value and then either run fly deploy locally or let GitHub Actions do that, it runs a full image build.

Now for my pure Go applications this isn’t a huge problem, it’s fairly fast and is cached. But for larger, more complex apps, which contain a bunch of stuff in the build, it can take a while (especially on Airbnb wifi while travelling! where my options are: run docker build locally and burn laptop battery or run the build remotely and wait for the context to upload - dockerignore helps with the latter, to an extent)

One trick I have used is to make sure fly.toml is in .dockerignore so it doesn’t contribute to the diff hash of COPY/ADD commands of a Dockerfile.

But, ideally I’d like to be able to push changes to things like environment variables or other things in the fly.toml file without running through the build part of the deployment process.

Looking at fly deploy’s options, there’s a --build-only, I think what I’m looking for would be something like --no-build or perhaps fly config push.

Anyway, would love to know if there’s a way to do this hidden in the CLI, thanks!


That makes sense.

As far as I’m aware there isn’t a --no-build (or equivalent) flag. And updating an environment variable will need a new deploy, as the vm gets the environment variables when it boots.

To solve that, you could deploy an existing image by getting its hash/tag. Skipping the build. Which is just what you want:

However there is no reply to that post to say whether that ended up working for them and updated the config/env too. In theory it should do. It is a new deploy. Worth a try to find out.

Yep this works, handy one to alias.

The example in the post is missing raw output mode from the jq invocation, here’s my Nushell compatible command:

fly deploy -i (fly releases --json | jq -j .[0].ImageRef)

Though I would definitely like to see this natively supported in Fly’s command line tool!