Gerrit,一种免费、开放源代码的代码审查软件,使用网页界面。
Gerrit,一种免费、开放源代码的代码审查软件,使用网页界面。利用网页浏览器,同一个团队的软件程序员,可以相互审阅彼此修改后的程序代码,决定是否能够提交,退回或者继续修改。它使用Git作为底层版本控制系统。它分支自Rietveld,作者为Google公司的Shawn Pearce,原先是为了管理Android计划而产生。
这个软件的名称,来自于荷兰设计师赫里特·里特费尔德(Gerrit Rietveld)。最早它是由Python写成,在第二版后,改成用Java与SQL。使用Google Web Toolkit来产生前端的JavaScript。
version: '3'
services:
gerrit:
image: gerritcodereview/gerrit
ports:
- "29418:29418"
- "8010:8080"
depends_on:
- ldap
volumes:
- /usr/local/docker/gerrit/etc:/var/gerrit/etc
- /usr/local/docker/gerrit/git:/var/gerrit/git
- /usr/local/docker/gerrit/db:/var/gerrit/db
- /usr/local/docker/gerrit/index:/var/gerrit/index
- /usr/local/docker/gerrit/cache:/var/gerrit/cache
environment:
- CANONICAL_WEB_URL=http://localhost
#entrypoint: /entrypoint.sh init
ldap:
image: osixia/openldap
ports:
- "389:389"
- "636:636"
environment:
- LDAP_ADMIN_PASSWORD=secret
volumes:
- /usr/local/docker/gerrit/ldap/var:/var/lib/ldap
- /usr/local/docker/gerrit/ldap/etc:/etc/ldap/slapd.d
ldap-admin:
image: osixia/phpldapadmin
ports:
- "6443:443"
environment:
- PHPLDAPADMIN_LDAP_HOSTS=ldap
[gerrit]
basePath = git
canonicalWebUrl = http://localhost
[index]
type = LUCENE
[auth]
type = ldap
gitBasicAuth = true
[ldap]
server = ldap://ldap
username=cn=admin,dc=example,dc=org
accountBase = dc=example,dc=org
accountPattern = (&(objectClass=person)(uid=${username}))
accountFullName = displayName
accountEmailAddress = mail
[sendemail]
smtpServer = localhost
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = http://*:8080/
[cache]
directory = cache
[container]
user = root
[ldap]
password = secret
1.修改docker-compose.yml
把#entrypoint: /entrypoint.sh init注释放开!
2.执行命令: docker-compose up gerrit
1.把#entrypoint: /entrypoint.sh init注释掉!
2.再输入命令: docker-compose up -d
访问:https:ip:6443
2.登录
账号:cn=admin,dc=example,dc=org
密码:secret
3.创建gerrit账号
1.点击Create a child entry
2.选择账号模板
3.填入账号信息
参数为:
Given Name: Gerrit
Last Name: Admin
Common Name: Gerrit Admin
User ID: gerritadmin
Email: gerritadmin@localdomain
Password: secret
4.提交到LDAP (commit the changes to LDAP)
1.输入地址
我这边配置的地址是:http:ip:8010
2.登录
3.登录成功
到这了就成功了!
手机扫一扫
移动阅读更方便
你可能感兴趣的文章