Deploy a website using git in Ubuntu
kramerapps.com
Deploy a website using git in Ubuntu
1–10 of 22 posts
Re: Deploy a website using git in Ubuntu
#2My apologies if this is too off-topic, but it's interesting to see everyone's virtualenv setup. I normally have my project/site/app in my environment folder, so it looks something like:
projectenv/
bin/
include/
lib/
project/
but I've also seen (as is the case in the OP's example): project/
env/
__init__.py
database.py
...
or even having a separate folder for all environments: envs/
env1/
env2/
...
project1/
...
project2/
...
Would anyone say there's a "preferred" setup?Re: Deploy a website using git in Ubuntu
#3what if the "bare" git repo (/srv/git/helloworld.git) belongs to a user "git" and the non-bare setup (/srv/www/helloworld) belongs to use "conradev" ? this (different users) setup is what one would prefer when multiple people are working on the project.
git pull hub master would fail in that case as it would be executed by the git user. so you'll probably have a lot of hard time figuring out permissions. what are your suggestions now ?
Re: Deploy a website using git in Ubuntu
#4The server need not even be set up git over http (via git-update-server-info or what have you) for this to be an issue.
Re: Deploy a website using git in Ubuntu
#5ok, here's a question. what if the "bare" git repo (/srv/git/helloworld.git) belongs to a user "git" and the non-bare setup (/srv/www/helloworld) belongs to use "conradev" ? this (different users) setup is what one would prefer when multiple people are working on the project. git pull hub master would fail in that case as it would be executed by the git user. so you'll probably have a lot of hard time figuring out pe…
Re: Deploy a website using git in Ubuntu
#6ok, here's a question. what if the "bare" git repo (/srv/git/helloworld.git) belongs to a user "git" and the non-bare setup (/srv/www/helloworld) belongs to use "conradev" ? this (different users) setup is what one would prefer when multiple people are working on the project. git pull hub master would fail in that case as it would be executed by the git user. so you'll probably have a lot of hard time figuring out pe…
This could be solved reasonably well with ACLs. Give the git user selective write to the tree rooted at /srv/www/helloworld.
So, we need to keep things simpler!
Re: Deploy a website using git in Ubuntu
#7My 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.
Re: Deploy a website using git in Ubuntu
#8Re: Deploy a website using git in Ubuntu
#9Is 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.