I was wondering if that is a good version for my live and stage setup.
1 Adminserver with 2 Appservers - Live
1 Adminserver with 1 Appserver - Stage
1 Gitlabserver
4 Developers
We already got the gitlab server and are using it just for tracking all of our changes. Now we want to deploy with the setup. I thought we could create a bare repo on the Adminservers and Appservers and setup a post-receive hook on each of them. The main remote origin would be the Gitlabserver and the other ones would be added as remote stage and remote live
The post-receive hooks with add the worktree (/var/www/test) and checkout the project and the changes made.
Is this a/the way to go? I could not find such a funcionality in Gitlab - maybe there is?
You can make use of the docker image repo from gitlab if it fits your need. You can build docker image from the stable source (usually on master branch). Instead of pulling the source code to your stage and live servers, you will pull docker image (which is conceptually your application wrap in the image environment). This is an opinionated answer