Setting up Heroku

To set heroku up (using your heroku.yml), just run.

rake all heroku:setup

This will create the heroku apps you have defined, and create the settings for each.

Run rake heroku:setup every time you edit the heroku.yml. It will only make incremental changes (based on what you've added/removed). If nothing has changed in the heroku.yml since the last heroku:setup, then no heroku changes will be sent.

Usage

After configuring your Heroku apps you can use rake tasks to control the
apps.

rake production heroku:deploy

A rake task with the shorthand name of each app is now available and adds that
server to the list that subsequent commands will execute on. Because this list
is additive, you can easily select which servers to run a command on.

rake demo staging heroku:restart

A special rake task 'all' is created that causes any further commands to
execute on all heroku apps.

Deploy Hooks

You can easily hook into the deploy process by defining any of the following rake tasks.

When you ran rails generate heroku:config, it created a list of empty rake tasks within lib/tasks/heroku.rake. Edit these rake tasks to provide custom logic for before/after deployment.

namespace :heroku do
# runs before all the deploys complete
task :before_deploy do
end
# runs before each push to a particular heroku deploy environment
task :before_each_deploy do
end
# runs after each push to a particular heroku deploy environment
task :after_each_deploy do
end
# runs after all the deploys complete
task :after_deploy do
end
end

License

Forked from Heroku Sans

Heroku Rails is a fork and rewrite/reorganiziation of the heroku_sans gem. Heroku Sans is a simple and elegant set of Rake tasks for managing Heroku environments. Check out that project here: http://github.com/fastestforward/heroku_san