How to mount app directory as a persistent volume when the app starts?

Persistent volumes need to be added separately. You’d need to do something like:

flyctl volumes create <name> --size 10 --region <region>

If you name it data, you can add this to your fly.toml to do the equivalent of your Docker volume:

[mount]
source = "data"
destination = "/mnt"

Running instances use 5GB volumes, but these do not persist between reboots. You could copy your sqlite file elsewhere periodically and pull it down to the instance at boot time, but it’s not built in.