Run multistep nomad job for rails apps

How would you have multiple steps in a nomad job? For example, we have a rails app that is deployed with capistrano. Before the rails app starts, capistrano first runs database migrations. rake db:migrate.

How could nomad run db:migrations before starting the rails app?