Quantcast
Channel: Admins Goodies » www-data
Viewing all articles
Browse latest Browse all 10

What’s a sensible workflow for deploying webserver content using git push?

$
0
0

Question

I’d like to use git push to update my (nginx) webserver content, while still keeping things secure. One way I could do this would be to ssh to my server, git pull from bitbucket into /srv/www, and chown -R www-data:www-data ..

It’d be slicker, though, to be able to push it there from my home computer (a la Heroku), but I’m not sure how best to handle issues of permissions and ownership.

Does anyone have advice about the most sensible way to go about this?

Answer

If you were using your web server as a git server, you could go for the only slightly complicated approach of using git hooks (put your update code into a script and call that on every git update); some git hosts support hooks too, but that’s going to be quite a lot more complicated as they’ll be calling your update notifier over the network rather than running a local script


Viewing all articles
Browse latest Browse all 10

Trending Articles