C
C
Cyril2017-11-28 10:35:28
GitLab
Cyril, 2017-11-28 10:35:28

Is it correct to put GitLab on the development server?

There is a development server that has a project under development in /var/www/project . I want to make /var/www/project a central git repository where I could upload changes from my home computer. And so that new developers can also upload their changes there.
1. Will it be correct if I install GitLab on this development server?
2. As far as I remember, the central git repository is usually stored on a separate machine (well, or on github.com). Developers merge their changes into it, and on the development server they pull changes from it. So right?
Help me to understand. Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Koryukov, 2017-11-28
@MadridianFox

The central repository (the one that multiple developers push to) must be bare - i.e. without files.
For example, GitLab just stores bare repositories.
If /var/www/project is a host only to show the site (not to develop right here), then you need to clone the repository from the central one there. When the developers push to the central one - manually or automatically do a pull to /var/www/project .
Where to install gitlab is a matter of the availability and power of your machines. In my last project, there were few machines and both gitlab and developer hosts worked on the dev machine, but in docker containers, i.e. they were not connected in any way.
If /var/www/projectthis is a host with which all developers work at once (they edit the code directly), then urgently make tea - you will have to redo it. It is better for each developer to allocate his own host where he will edit the files of his copy of the site.

E
Eugene Wolf, 2017-11-28
@Wolfnsex

1. Will it be correct if I install GitLab on this development server?
2. As far as I remember, the central git repository is usually stored on a separate machine (well, or on github.com).
Have you ever thought about what it is connected with? :)
In fact, GitLab does not work very "quietly" if it is proxied, there is a whole series of "dances with tambourines" so that it works normally. This is the first moment.
The second point is directly related to the first - GitLab likes to have the server entirely at its disposal. Without going too far into details, you can put GitLab on some kind of virtual machine (for example, LXC / LXD), and the development server on a second virtual machine, and all this will work within the same server. In this case, the number of "potential problems" is reduced to zero, but it is highly desirable to have 2 different IPs to avoid proxying (and each machine to allocate its own IP). Otherwise, we will again run into an HTTP proxy with all the consequences ...
Another important one - GitLab loves server resources very much and usually requires at least 1-2GB of RAM... Which, of course, will be "bitten off" from the server and cannot be used by other applications. And also, on the server there will be a "parasitic" load created by GitLab itself, and when someone decides to find out "why everything slows down" - it will not be as easy as we would like, because. on the server, in addition to your application, GitLab will work ...
Answering directly your question - "is it possible to do this?" - can. But not worth it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question