Skip to content

Commit dc1e7e4

Browse files
committed
2018-02-05 补充 docker gitlab
1 parent 5f91474 commit dc1e7e4

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

Gitlab-Install-And-Settings.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,51 @@
11
# Gitlab 安装和配置
22

3+
4+
## Docker 安装方式
5+
6+
7+
- 创建宿主机挂载目录:`mkdir -p /data/gitlab/gitlab /data/gitlab/redis /data/gitlab/postgresql`
8+
- 这里使用 docker-compose 的启动方式,所以需要创建 docker-compose.yml 文件:
9+
10+
```yml
11+
gitlab:
12+
image: sameersbn/gitlab
13+
ports:
14+
- "10022:22"
15+
- "10080:80"
16+
links:
17+
- gitlab-redis:redisio
18+
- gitlab-postgresql:postgresql
19+
environment:
20+
- GITLAB_PORT=80
21+
- GITLAB_SSH_PORT=22
22+
- GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string
23+
- GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alpha-numeric-string
24+
- GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string
25+
volumes:
26+
- /data/gitlab/gitlab:/home/git/data
27+
restart: always
28+
gitlab-redis:
29+
image: sameersbn/redis
30+
volumes:
31+
- /data/gitlab/redis:/var/lib/redis
32+
restart: always
33+
gitlab-postgresql:
34+
image: sameersbn/postgresql:9.5-3
35+
environment:
36+
- DB_NAME=gitlabhq_production
37+
- DB_USER=gitlab
38+
- DB_PASS=123456
39+
- DB_EXTENSION=pg_trgm
40+
volumes:
41+
- /data/gitlab/postgresql:/var/lib/postgresql
42+
restart: always
43+
```
44+
45+
- 启动:`docker-compose up -d`
46+
- 浏览器访问:<http://192.168.0.105:10080>
47+
48+
349
## 本文前提
450

551
- 本文只讲解 Gitlab 的搭建配置相关,至于开发流程本质跟 Github 没啥区别的,所以读这篇文章建议最好是已经会了 Github 那种开发流程。
@@ -149,4 +195,5 @@
149195
- <http://blog.smallmuou.xyz/git/2016/03/11/%E5%85%B3%E4%BA%8EGitlab%E8%8B%A5%E5%B9%B2%E6%9D%83%E9%99%90%E9%97%AE%E9%A2%98.html>
150196
- <https://zhangmengpl.gitbooks.io/gitlab-guide/content/whatisgitflow.html>
151197
- <https://blog.coderstory.cn/2017/02/01/gitlab/>
152-
- <https://xuanwo.org/2016/04/13/gitlab-install-intro/>
198+
- <https://xuanwo.org/2016/04/13/gitlab-install-intro/>
199+
- <https://softlns.github.io/2016/11/14/jenkins-gitlab-docker/>

Jenkins-Install-And-Settings.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permiss
5252
- Git plugin
5353
- GitLab Plugin
5454
- SSH Slaves plugin
55+
- Maven Integration plugin
5556
- Matrix Authorization Strategy Plugin
5657
- PAM Authentication plugin
5758
- LDAP Plugin
@@ -70,6 +71,7 @@ Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permiss
7071
- GitHub plugin Github与Jenkins集成
7172
- GIT client plugin Git客户端插件
7273
- Maven Integration plugin:用于构建 Maven 项目
74+
- Gradle Plugin:用于构建 Gradle 项目
7375
- Gitlab Hook Plugin:用于触发 GitLab 的一些 WebHooks 来构建项目
7476
- FireLine Plugin:代码规范检查,已经集成了阿里巴巴的代码规约(P3C)检查
7577
- Gitlab Authentication 这个插件提供了使用GitLab进行用户认证和授权的方案

0 commit comments

Comments
 (0)