F
F
fman22017-05-18 15:53:01
git
fman2, 2017-05-18 15:53:01

How to make your own GIT server?

Good afternoon.
There is a website that several developers are working on at the same time.
There is a server, let's call it dev.test.ru, which hosts ubuntu, nginx, php, mysql, git and a demo site,
and there are developers' computers, mainly on Windows.
How to create a repository in GIT correctly so that everyone can push into it and these changes are immediately displayed on the dev.test.ru website, because the site is being actively developed. After all the changes are committed and the release takes place, we copy the code to the production server. But how to solve the issue with GIT in this case?
I forgot to add - now we use Gitlab, but I don’t want to drag the gitlab to my server, I want to do everything through the terminal.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
RidgeA, 2017-05-18
@RidgeA

https://about.gitlab.com/
+ gitlab ci + docker if needed

H
huwesu, 2017-05-18
@huwesu

I forgot to add - now we use Gitlab, but I don’t want to drag the gitlab to my server, I want to do everything through the terminal.

You can use light analogues - gogs.io, gitolite, gittosis, drone.io

E
Eugene Khrustalev, 2017-05-18
@eugenehr

1. Create a bare repository on the server;
2. Add a new remote to this server to the working copies of the developers;
3. In the bare repository, add a hook (I use update), in which to checkout the desired branch to the desired directory;
4. Run tests if necessary

D
Dmitry MiksIr, 2017-05-18
@miksir

1. git server, you can take saas solutions (github, gitlab, etc.) or make your own (the simplest is just ssh access to the server and git init --bare done there)
2. git clone on the dev server
3. Hook post-receive on the git server, who ssh to the dev server and do a git pull there. In the case of github, etc. - watch their webhooks, etc. - and on their call already do git pull). Of course, all sorts of migrations and so on will have to be done by hand. Or take deployment systems already and use them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question