iCyborg
iCyborg

Reputation: 4728

How to use staging server and github for my RoR App ?

I am new to all this so my apologies if this sounds very basic but I am looking to use github and a staging server (staging.example.com) for my RoR app and then will be moving the staging code to example.com. So I will be having something like this -

Local System <----> Github <---- >staging server <---> Live Server/site

?

Upvotes: 0

Views: 102

Answers (1)

mraaroncruz
mraaroncruz

Reputation: 3809

I think a more illustrative version of your flow would be something like this

               Github
             /   |   \
 Staging Server  |   Production Server
       \         |        /
        \        |       /
         \       |      /
       Development Machine

So you would push to github from your dev machine, then when you deployed to staging or production, using I assume capistrano, it will check out code from github in either of these branches on the respective remote server. I would use a master for production and maybe a branch called dev for staging.

There are lots of scenarios here but another common one is to use webhooks (I think that's what they're called) on github to create an event each time you push to a branch. That could be also deploying code to your staging or continuous integration server. They are pretty neat, but if you are just starting off with this, I would keep it simple.

There is a short and sweet Railscast on setting up a staging environment here (sorry, not free)

Upvotes: 1

Related Questions