Posted over 5 years ago. Visible to the public.

Deploy and migrate with a single Capistrano command

Note that this sounds good but is not good at all when hooking tasks on cap deploy (see this article). Make sure to hook your calls properly when using this.


To deploy an application and run all pending migrations before restarting it, you can use the following standard Capistrano task:

cap deploy:migrations

Little is known what happens when the deployment goes through, but a migration or a rake task afterwards fails. Please update this note when you find out.

A bunch of books about building and maintaining large-scale Rails applications, all at a discounted price. Featuring best-selling books like Trailblazer, Fearless Refactoring, or Growing Rails Applications in Practice!

Author of this card:

Avatar
Henning Koch
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandropedia