Is there a way to load config in via a volume that isn’t a persistent volume in the sense it is tied to a specific region? In many apps I build we load environmental configs via files rather than env variables. In some cases they just can’t easily be env variables. I just had a look at how to do it in Fly, and I don’t think the Fly Volumes is what I want. The best I’ve come up with so far is I need to make custom Docker images that wrap the main image and embed the config.
Interested to hear if there is some other way to mount config as files into the images when they run.
The volumes on Fly don’t auto replicate to each other, so there isn’t idea of a “global hard disk” just yet.
That said, you could have the configs on Consul or another distributed key value store like KeyDB that you can run inside Fly, or just have them stored in external object storage like S3.
There are even options coming up soon, like a key value store on NATS that auto-replicates to all edges.
Oh interesting. I assume the image could need to connect.to Consul to retrieve the config during it’s startup? Or is there a way for me.to config Consul to push the files into the container? I’ll do some research, I have more experience with K8s than Consul.
Side question: Is there a way to discover experimental fields?
Yeah, Consul has a super easy HTTP API: HTTP API | Consul by HashiCorp that you can access from pretty much any stack, including just curl. So you don’t actually need to pull in any libraries if you don’t want to. You could just download the data into the volume on application startup.