Better way to upload files to fly volumes?

Is there a good way to manually manage the files on a fly volume?

Right now, on app boot, I need to instantiate a download to the volume from S3. But it’s 100+GB and doesn’t change much, so putting this logic in the main app doesn’t seem to make sense.

Is there any other way to add a file to a fly volume besides in the main app logic?

Hi @brendan

For a file that size, you’re pretty much doing it the best way possible.

If you simply want to remove this process from your app code you could look at running a script on boot that runs before your main app gets started.

It’d be much easier to just run a wget command, but it seems like this doesn’t normally happen with the volume attached. See: App Configuration (fly.toml) · Fly Docs

It recommends:

If you need to modify persistent volumes or configure your application, consider making use of CMD or ENTRYPOINT in your Dockerfile.

But I figured CMD or ENTRYPOINT would override the fly.toml start command. Is there a way to just do this with wget?

Yes, the fly.toml start command is effectively the same as CMD so what you could do is have a shell script that is called by the fly.toml start command, then inside the shell command perform the wget followed by starting your app.