I’ve deployed my first Rails app on Fly.io, and it was great to see fly intelligently pick “heroku/buildpacks:20” as the builder. However, I still need to run db setup and migrations. Am I right in thinking there’s no easy “heroku-like” way to do run one-off or on-deploy commands, and I just need to switch to a custom Dockerfile?
Hey! You can use this:
[deploy]
release_command = "bundle exec rails db:migrate"
For setup, you could deploy and then login with fly ssh console
to run one-off commands.
Oh wow perfect, thanks! I didn’t see this one in the configuration docs
1 Like