Rails3 & Git & Heroku - development / middleware server

I have a Rails 3 application that I am developing with a team using Git / Github and deploying Heroku cedar to the stack. Our Github repository has 2 main branches of Master and Development.

I would like to regularly send our development department to another server on Heroku as a development / intermediate preparation environment.

What is the easiest way to push our development branch to a different application than the Wizard without breaking the Git stream a lot?

Thanks a lot!

+4
source share
3 answers

You need to add a second git remote, i.e. your second application is heroku git repo url for your application to be able to click on it from one code base.

At the moment, you probably have a default remote start named "heroku" that clicks on your production application.

You need to add a second remote start pointing to your new heroku application that you are going to use for staging, for example

git remote add staging <git repo url from 'my apps' page on heroku> 

after you set the new git source setting, you can click on it through;

 git push staging <branch to deploy>:master 
+7
source

Simple Heroku always uses a leading branch, but with Git you can click / your branch / development / to / their / master

For instance:

 git push heroku development:master 

where heroku is your origin for developing your hero env, and development is your local branch of development. You can also override RACK_ENV var on Heroku if you do not want your dev branch to work in production mode (although I personally would create an intermediate environment in your code that does caching, etc., but does not send email to addresses production, etc.)

+1
source

heroku_san is a gem that allows you to use complex deployment configurations when using Heroku, without having to constantly indicate which Heroku application you want to click on the command line. This will allow you to do what you described above.

0
source

All Articles