Rake task for deploying to Heroku

Posted by Luke Francl
on Friday, February 12

Deploying to Heroku is pretty easy, but I’ve often found myself needing to do additional tasks after pushing to Heroku’s git repository. For example, if you have to migrate, you have to do that after pushing; and after migrating you have to restart the app server.

So here is a Rake task to automate that. It uses Heroku’s client library to find the git remotes you need to push to. Use it like this:

rake deploy # deploys to your default app for this directory

rake deploy APP=some-other-app # deploy to another app (e.g., a staging server)

Comments

Leave a response

  1. Elijah MillerFebruary 13, 2010 @ 08:22 AM

    We’re deploying all of our apps to Heroku these days, we have rake tasks for all the common Heroku actions including setup/deploy across multiple applications.

    https://github.com/fastestforward/heroku_san