Deploy'em is a simple deployment tool for Rails apps that are deployed to Heroku for teams that follow a git-flowish strategy. We say 'git-flowish' because it's not strictly gitflow.
It's basically a collection of Rake tasks.
This gem is based on the idea that you have 2 branches in your git repository and each one of them has a associated Heroku app:
- a
master
branch that is deployed to a Heroku Production app - a
develop
branch that is deployed to a Heroku Staging app
Add this line to your application's Gemfile:
gem 'deployem'
And then execute:
$ bundle
Or install it yourself as:
$ gem install deployem
For this gem to work, you'll need to have the following setup
- a
master
branch in your Git repository - a
develop
branch in your Git repository - a heroku app who's remote is named
heroku
- a heroku app who's remote is named
heroku-staging
You'll also need to have the Heroku CLI installed if you're going to take advantage of the DB migrations part.
This gem is a collection of rake tasks, so after installing it, simply run the rake tasks:
This task does two things:
- Pushes the latest
develop
branch to a Git remote calledheroku-staging
- Asks you if you want to run DB migrations
To use it, run:
$ rake deploy:staging
Which will basically run a git push heroku-staging develop:master
and then ask you if you want to run DB migrations which will in turn will run heroku run rake db:migrate -r heroku-staging
.
This task does two things:
- Pushes the latest
master
branch to a Git remote calledheroku
- Asks you if you want to run DB migrations
To use it, run:
$ rake deploy:production
Which will basically run a git push heroku master:master
and then ask you if you want to run DB migrations which will in turn will run heroku run rake db:migrate -r heroku
.
Bug reports and pull requests are welcome on GitHub at https://github.com/bitesite/deployem.
The gem is available as open source under the terms of the MIT License.