We have Gitlab server running in our office in ubuntu server. I'm doing auto deployment using post-receive hook from each repo. This is what I did,
- I wrote shell script in post-receive file to push code from gitlab server to our actual production server.
- So all the repos in our gitlab server has post-receive hook to make auto deployment.
- I installed git bare repo in production server to receive code gitlab server.
- In production server's bare repo I wrote another post-receive hook to deploy the code using
GIT_WORK_TREE
and restart nginx server in same post-receive hook.
Now I want to make this auto deployment through existing standard tools since with this way of deployment I need to configure all the repo so it will take lot of time again. What are other ways to do this auto deployment.
Production Server: ubuntu 14.04LTS, Production Webserver: nginx, local git server: gitlab.
UPDATE: I wanted to do this now because I had problem with gitlab shell as @Ciro Santilli explained. And I'm also doing git push production
as @Ciro Santilli answer's link mentioned after I had problem with gitlab shell. But all I wanted to do is what Gitlab_CI does, push to master branch
our production server should be updated. I'll try with Gitlab_CI but I wanted to know is there any other tool to do the same.