我想在自己的服务器上安装GitLab的私有存储库。该存储库将托管在我的服务器上,而不是云上。我该如何实现?非常感谢您的帮助。
最简单的方法是使用GitLab Omnibus installation,并使用其中包含所有内容的one Docker图像。参见其docker manual page。
sudo docker run --detach \
--hostname gitlab.example.com \
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://my.domain.com/'; gitlab_rails['lfs_enabled'] = true;" \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
这样,您不必手动安装所有GitLab组件(ruby,Go,Gitaly等):Docker映像中已经安装了所有组件。