Capistrano: disable deploying to your database server

By default Capistrano will try to deploy your code to whatever server you have set to the :db role, and will try to run the migrations there too.

I’m happy with my database as it is right now so I wanted to disable it.

Here’s how. Just comment out:

before ‘deploy:restart’, ‘deploy:migrate’

or to enable it see:

There’s a more complex discussion (with roles) here:

If you’re doing a deploy:cold then it automatically runs a db:migrate. So, when you want to do an initial deployment without a migration use:


Leave a Reply

Your email address will not be published. Required fields are marked *