Requirements: There is a soft routing device at home, hardware configuration: CPU (J4125), memory (8G), hard disk (128G), thinkSet up a private Git repository, I have used Gitlab to build a private Git repository, but it is too heavy and too hardware-consuming, so if you want to find a lightweight Git repository, you can find Gogs, Gitea, etc. on the Internet.
Considering that Git repositories store source code, in order to prevent the risk of source code leakage, weProhibit Gitea containers from accessing the network, and reverse proxy to the Gitea container via nginx.
Gogs:Gogs' goal is to create the easiest, fastest, and easiest way to build a self-service Git service. Developing in Go allows Gogs to be distributed as a standalone binary and supports all platforms supported by Go Language, including Linux, Mac OS X, Windows, and ARM platforms. Address:The hyperlink login is visible.
Gitea:Gitea is a self-hosted Git service program. It is similar to GitHub, Bitbucket or Gitlab. It was developed from Gogs, but we have forked it and named it Gitea. Basically, some developers think that Gogs's developer efficiency is relatively slow, and they do not accept others to join the development, and all modifications and PRs need to be reviewed by him alone, which is very detrimental to the development of Gogs. Therefore, some developers decided to reopen a project based on Gogs, which is Gitea. Address:The hyperlink login is visible.
First, the ESXI virtualization platform is installed on the soft route, and then a new CentOS 7 virtual machine is installed with a Docker environment.
The Docker Compose plugin needs to be installed, and the tutorial is as follows:
Create a new warehouse data directory folder on the host machine, and use the following command:
and create a new one under the directorydocker-compose.yamlfile, configured as follows:
The enabling command is as follows:
At this point, we still can't access the Gitea service through the browser, so we need to create a new nginx container reverse proxy to the Gitea container.
Create a new nginx configuration file on the host machine with the following command:
nginx.conf is configured as follows:
Create a new nginx container with the following command:
We also need to connect the nginx container to the gitea network with the following command:
At this time, access the host +3000 port through the browser, and you can see the installation interface of gitea, as shown in the figure below:
Modify the server domain name and basic URL according to your actual situation, as shown in the figure below:
Uncheck the following settings:
Set the administrator account and password, as shown in the figure below:
Click Install Now, and after the installation is completed, as shown below:
(End)
|