Fly.toml improvement thoughts

Just some thoughts as I’m working through deployments:

Lots of public Docker images want specific env vars set at runtime. It would be helpful to be able to ‘interpolate’ secrets or other env vars (like DATABASE_URL) within the variable expected by the image.

Being able to change env vars without a redeployment would be nice, similar to how changing a secret works now. I suppose this ties into the general desire for declarative deployment templates for other attributes.

It would be helpful to be able to specify a different Dockerfile for deployment, as well as a specific multistage target. Most of my apps do not use Dockerfile as the deployment target.

Finally, this is an interesting approach from AWS to support a subset of Docker Compose directly. This allows using the same configuration for local development. Not asking for this, just noting that it kills many birds with one stone :smiley:

That’s interesting. Can you give an example how you’d use it?

We’ll fix this over the next month or two.

You can do it now with the --dockerfile flag, or specify paths to everything like this:

flyctl deploy --dockerfile ./path/to/dockerfile --config ./path/to/config <path/to/context>

There’s also a hidden --build-target flag to set the target for multistage build files. You can use it right now and I’ll unhide it in the next release.

I also like docker compose for local dev. We’ve talked about it for deployment, but there’s a lot of compatibility we need to figure out. That link is interesting, thanks for sharing. Will think on that.

Thanks for the tips on the flags!

Interpolation would be used the same way you might do it with Docker Compose. Note: I edited this post because my previous post did not make sense. I will update my answer here with a proper example!