I’m running into problems deploying an SQLite/Litestream-based app on Fly when a migration runs slowly. For example, a migration might create a new index for a large table. If the migration takes too long, Fly kills the process and restarts it. This keeps happening and the app never finishes deploying.
It’s not possible to use the release_command to run the migration because it needs to be run on the same volume. As far as I understand, the recommendation is to run the migrations when the app starts up.
Is the best approach to add an explicit check with a long grace_period to account for the long migration? Has anyone else found a better solution for this issue? Thanks!