I am in the process of implementing Gitlab at my workplace and transitioning everyone over to it for better code reviews, issue management directly linked to commits, and integration with user stories on Pivotal tracker.
My current setup for a test app is as such:
Git bare repo with all the code for my PHP based web-app found in: /var/opt/gitlab/git-data/repositories/git/test-app.git
Deploy directory is: /var/www/test-app
In the Git repo directory, I did the following:
export GIT_WORK_TREE=/var/www/test-app
git checkout -f master
This worked like a charm and all the files are accessible in /var/www/test-app as expected.
Here is where I am stumped. I want the Gitlab server to ONLY host the Git bare repos and not the deploy directories. The deploy directory is to be hosted on a separate server.
Is there a way to have a different server setup as the GIT_WORK_TREE? I tried putting my server's details in there such as :
[email protected]:/var/www/test-app
but no dice.
Is this even possible or am I barking up the wrong tree here? Would love some advice.
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…