Gitlab的部署与配置

一、Docker

Deb安装包下载地址:https://packages.gitlab.com/gitlab/

ARM

官方gitlab-ce暂没有ARM 架构的镜像,所以由第三方的镜像进行部署

参考:https://about.gitlab.com/handbook/engineering/development/enablement/distribution/maintenance/arm.html#why-dont-you-compile-arm32-bit-packages-on-arm64-for-speed

GitHub:https://github.com/ulm0/gitlab

DockerHub:https://hub.docker.com/r/yrzr/gitlab-ce-arm64v8

mkdir -p /data/gitlab/data /data/gitlab/logs /data/gitlab/config && \
docker run -d \
--hostname 192.168.1.8 \
-e GITLAB_OMNIBUS_CONFIG="external_url 'http://192.168.1.1:38080';gitlab_rails['lfs_enabled'] = true; gitlab_rails['gitlab_shell_ssh_port'] = 30022 ; node_exporter['enable'] = true ;" \
-e RAILS_ENV="production" \
-e GITLAB_EMAIL_DISPLAY_NAME="Gitlab 13" \
-e GITLAB_EMAIL_FROM="*****@163.com" \
-e GITLAB_EMAIL_REPLY_TO="*****@163.com" \
-e GITLAB_EMAIL_SUBJECT_SUFFIX="Gitlab 13" \
-e GITLAB_ROOT_PASSWORD="*****" \
-p 38080:38080 \
-p 30022:22 \
--name gitlab \
--restart always \
--privileged \
-v /data/gitlab/config:/etc/gitlab \
-v /data/gitlab/logs:/var/log/gitlab \
-v /data/gitlab/data:/var/opt/gitlab \
ulm0/gitlab:13.2.6

手动构建新版本的arm gitlab docker镜像

git clone https://github.com/ulm0/gitlab.git gitlab-arm-docker
cd gitlab-arm-docker
echo "13.8.1" > VERSION
make build

针对raspberry的deb包下载地址:https://packages.gitlab.com/gitlab/raspberry-pi2

二、包管理器

ARM架构(ubuntu)

https://packages.gitlab.com/app/gitlab/gitlab-ce/search?q=&filter=debs&filter=debs&dist=ubuntu%2Fjammy

apt-get install curl gnupg apt-transport-https
curl -fsSL https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey | gpg --dearmor > /usr/share/keyrings/gitlab_gitlab-ce-archive-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/gitlab_gitlab-ce-archive-keyring.gpg] https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu jammy main" >> /etc/apt/sources.list.d/gitlab_gitlab-ce.list
echo "deb-src [signed-by=/usr/share/keyrings/gitlab_gitlab-ce-archive-keyring.gpg] https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu jammy main" >> /etc/apt/sources.list.d/gitlab_gitlab-ce.list

apt update
apt install gitlab-ce

安装路径:/opt/gitlab

配置文件:/etc/gitlab/gitlab.rb

启动命令:gitlab-ctl reconfigure

Copyright Curiouser all right reserved,powered by Gitbook该文件最后修改时间: 2023-11-30 18:16:54

results matching ""

    No results matching ""