I’m wondering if those fly.toml files are meant to be put into version control. They can be retrieved with flyctl config save -a app-name
, so they are never really lost and could be considered ephemeral. Is that the way to think about it? I don’t see anything mentioned in the docs about how to treat these config files: App Configuration (fly.toml) · Fly Docs
Anyone got good intuition/experience with this?
Hi!
Yep, they’re meant to be saved in version control. (Secrets should be created as secrets via fly secrets...
so they do not end up in version control).
flyctl config save -a app-name
isn’t perfect, for example, in one app I have:
[build]
[build.args]
NODE_VERSION = "10"
PHP_VERSION = "7.4"
And that part is NOT included when creating a fly.toml
file via flyctl config save
.
I believe that’s because the build
section isn’t related to configuration saved within Fly’s side (to know what ports to expose, health checks to make, etc) but instead is something used purely by flyctl
when deciding how to build a Docker image to deploy.
2 Likes
Thanks for clarifying that. It’s not mentioned anywhere that the build args are not saved with fly config save
, so that’s valuable (I can confirm, I’ve tried it).