News for hackers. Stuff that matters.
Re:Let's deploy via Git by jakobe on Sunday June 23, 2013 @01:01PM (#5928287)
I'm not sure I like the approach of serving files from your repository. I'm not sure about how git works in detail, but are repository updates even atomic?

When I deploy my website, I use a different approach: My webroot is just a symlink. My deployment script exports the repository to a directory with a unique name for every commit. When the export succeeds, the symlink is updated to point to the new directory.

The advantage: Changing to the new version is instantaneous. If something should go wrong, I can immediately revert by changing the symlink back to the old dir.

Re:Let's deploy via Git by bluetooth on Sunday June 23, 2013 @11:26PM (#5930822)
> but are repository updates even atomic?

No, they are not. During the push, there will be a short amount of time in which some parts of the website will be operating on new code, while others will be operating on old code. If many components are in play (ie using libraries) you may end up breaking things if a new request comes in at the right time.

Re:Let's deploy via Git by gkop on Sunday June 23, 2013 @02:26PM (#5928730)
You can combine this approach with updating the code with a git pull to get all the benefits of git. Capistrano, the conventional Ruby deploy script, does this by default.