@@ -261,6 +261,7 @@ gitlab-ctl reconfigure
261261[gitlab社区版docker hub地址](https://hub.docker.com/r/gitlab/gitlab-ce/tags/)
262262
263263` ` ` shell
264+ mkdir -p /data/gitlab
264265export GITLAB_HOME=/data/gitlab
265266docker run --detach \
266267 --hostname gitlab.example.com \
@@ -283,23 +284,34 @@ docker run --detach \
283284
284285[使用docker-compose安装](https://docs.gitlab.com/ee/install/docker/installation.html#install-gitlab-using-docker-compose)
285286
287+
288+
289+ 创建gitlab数据目录
290+
291+ ` ` ` shell
292+ mkdir -p /data/gitlab
293+ export GITLAB_HOME=/data/gitlab
294+ ` ` `
295+
296+
297+
286298编辑docker-compose.yml文件
287299
288300默认 ` https` 和 ` ssh` 端口
289301
290302` ` ` yaml
291303# 自行修改相对应的域名、映射的端口、挂载的卷
292304cat > docker-compose.yml << EOF
293- version: '3.6'
294305services:
295- web:
296- image: 'gitlab/gitlab-ee:latest'
306+ gitlab:
307+ image: gitlab/gitlab-ce:<version>-ce.0
308+ container_name: gitlab
297309 restart: always
298310 hostname: 'gitlab.example.com'
299311 environment:
300312 GITLAB_OMNIBUS_CONFIG: |
301- external_url 'https://gitlab.example.com'
302313 # Add any other gitlab.rb configuration here, each on its own line
314+ external_url 'https://gitlab.example.com'
303315 ports:
304316 - '80:80'
305317 - '443:443'
@@ -319,19 +331,20 @@ EOF
319331` ` ` yaml
320332# 自行修改相对应的域名、映射的端口、挂载的卷
321333cat > docker-compose.yml << EOF
322- version: '3.6'
323334services:
324- web:
325- image: 'gitlab/gitlab-ee:latest'
335+ gitlab:
336+ image: gitlab/gitlab-ce:<version>-ce.0
337+ container_name: gitlab
326338 restart: always
327339 hostname: 'gitlab.example.com'
328340 environment:
329341 GITLAB_OMNIBUS_CONFIG: |
330342 external_url 'http://gitlab.example.com:8929'
331- gitlab_rails['gitlab_shell_ssh_port'] = 2224
343+ gitlab_rails['gitlab_shell_ssh_port'] = 2424
332344 ports:
333345 - '8929:8929'
334- - '2224:22'
346+ - '443:443'
347+ - '2424:22'
335348 volumes:
336349 - '$GITLAB_HOME /config:/etc/gitlab'
337350 - '$GITLAB_HOME /logs:/var/log/gitlab'
@@ -360,40 +373,6 @@ a9ed8420da5d gitlab/gitlab-ce:latest "/assets/wrapper" 3 minutes ago Up
360373
361374
362375
363- # # helm安装
364-
365- # ## 添加仓库
366-
367- ` ` ` shell
368- helm repo add gitlab http://charts.gitlab.io/ && helm repo up
369- ` ` `
370-
371-
372-
373- # ## 下载包
374-
375- ` ` ` shell
376- helm pull gitlab/gitlab
377- ` ` `
378-
379-
380-
381- # ## 解压缩
382-
383- :::tip 说明
384-
385- 这里安装的chat版本是9.0.1,应用版本是18.0.1
386-
387- :::
388-
389- ` ` ` shell
390- tar xf gitlab-9.0.1.tgz
391- ` ` `
392-
393-
394-
395-
396-
397376
398377
399378# # 访问gitlab
0 commit comments