Thanks for this - I have a personal Github account, but this is for work, and they want to keep it all in-house so that's why I setup a git server. It was pretty easy - I just get confused with all the branching and stuff because I just don't take the time to dig in and study. You guys are always so helpful and I appreciate it! I'll try these tips. I use passenger, too, so I'm sure there's a little twist there.
Anyway, I just wanted to be sure I was on the right track with this setup. Thanks again. On Tuesday, December 11, 2012 7:24:02 PM UTC-8, Colin Ross wrote: > > Using git (github or self-hosted) is a completely valid and often > suggested best practice for getting code out into a production environment. > This workflow is agnostic to what mechanism action does the pushing and > pulling, be it capistrano, chef, or others -- or manually for that matter. > > On a sidenote: I personally would suggest getting a tiny (and cheap) > github account so you don't need to worry about running your own repo and > focus on building the app. It can cost as littel as $7/month to upgrade > your account to (up to) 5 private repos where you can house your code. > > The general idea is to push your code to the git repo, and have your > production machine do: > git pull origin/master > bundle install --deployment > bundle exec rake db:migrate > bundle exec rake assets:refresh (if applicable) > restart unicorn > > How involved that process/infrastructure is depends on many questions > including: > - do you need zero-downtime deployments? > - are you deploying to one sever, or a cluster of 12? > > This is a very thin view at a big picture, but it is a start. > > Colin Ross > > On Tuesday, December 11, 2012 2:13:12 PM UTC-8, KT wrote: >> >> Hi all - >> >> As just an RoR hobbyist, I kinda just make things work as I go. It means >> sloppy coding and a host of other bad practice. BUT, I'd like to get your >> input on the best way to go for development vs production environments. >> >> I currently have 2 VMs: "trix" is my production server. I cloned "trix" >> as "dukes" to make it my development server. >> >> I also have a VM, "pongo", as my Git server. I'm having a hard time >> "getting" Git, though, and I'm wondering if it's the right way to go. >> >> I was originally going to develop on dukes, push my changes to pongo, >> then pull/merge to trix via git. Is this an ok way of doing things? >> >> If so, can someone help me with the basics on how to actually DO this? >> It doesn't seem like it would be too complicated, but I'm just not >> understanding the whole git branch-remote-origin-master-whatever stuff... >> thanks in advance. >> > -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby
