Live data from Hacker News

Deploy a website using git in Ubuntu

kramerapps.com

21–22 of 22 posts

Re: Deploy a website using git in Ubuntu

#21
post #7

Is git push atomic? I'm reaching the point with a PHP application where enough people are using it at any one point, every time i push an update (using lftp --mirror over sftp) someone gets caught in the crossfire. My next step is deploying to a temporary folder and swapping symlinks around, but if git/hg can do an atomic update that would be much simpler.

No. In fact, git doesn't even swap individual files atomically (which is what I had expected it to do): during updates the files momentarily disappear, which caused serious issues for my site and made me move back to rsync deployment recently (which has the other security advantage of not keeping the entire history of the website on the edge servers).

Re: Deploy a website using git in Ubuntu

#22
post #7

Is git push atomic? I'm reaching the point with a PHP application where enough people are using it at any one point, every time i push an update (using lftp --mirror over sftp) someone gets caught in the crossfire. My next step is deploying to a temporary folder and swapping symlinks around, but if git/hg can do an atomic update that would be much simpler.

Using symlinks is the way Capistrano does it and has the benefit of being both atomic and easy/quick to revert if something goes wrong.

There's no way git checkout can be atomic.

Post reply on HN