Skip to content

Commit 17814ea

Browse files
author
pptfz
committed
更新笔记
1 parent fc55375 commit 17814ea

2 files changed

Lines changed: 23 additions & 43 deletions

File tree

docs/linux/devops工具/gitlab/gitlab安装/gitlab安装.md

Lines changed: 22 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -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
264265
export GITLAB_HOME=/data/gitlab
265266
docker 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
# 自行修改相对应的域名、映射的端口、挂载的卷
292304
cat > docker-compose.yml <<EOF
293-
version: '3.6'
294305
services:
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
# 自行修改相对应的域名、映射的端口、挂载的卷
321333
cat > docker-compose.yml <<EOF
322-
version: '3.6'
323334
services:
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

docs/云原生/k8s/康忙北鼻.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# 康忙北鼻

0 commit comments

Comments
 (0)