Skip to content

Instantly share code, notes, and snippets.

@ganadist
Created April 10, 2019 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ganadist/9d389d572a5b61bd8edd9fd897a6ff72 to your computer and use it in GitHub Desktop.
Save ganadist/9d389d572a5b61bd8edd9fd897a6ff72 to your computer and use it in GitHub Desktop.
version: '3'
services:
gerrit:
image: gerritcodereview/gerrit:2.16.7-centos7
hostname: gerrit.private
container_name: gerrit
volumes:
- ./gerrit.config:/var/gerrit/etc/gerrit.config
environment:
- CANONICAL_WEB_URL=http://gerrit-test.local
networks:
net:
ports:
- "29418:29418"
- "8080:8080"
entrypoint:
/var/gerrit/bin/gerrit.sh run
www:
image: nginx
hostname: www.private
container_name: nginx
volumes:
- ./gerrit-nginx.conf:/etc/nginx/conf.d/gerrit.conf:ro
networks:
net:
ports:
- "80:80"
networks:
net:
server {
listen 80;
server_name gerrit-test.local;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://gerrit:8080/;
client_max_body_size 20g;
}
}
[gerrit]
basePath = git
serverId = ba716cb5-5e25-444c-980b-c51b70fc97cc
canonicalWebUrl = http://gerrit-test.local
[database]
type = h2
database = db/ReviewDB
[auth]
type = DEVELOPMENT_BECOME_ANY_ACCOUNT
#type = OAUTH
#gitBasicAuthPolicy = HTTP
#type = HTTP
#httpHeader = GITHUB_USER
#httpDisplayNameHeader=GITHUB_NAME
#httpEmailHeader=GITHUB_EMAIL
#loginUrl = /login
#logoutUrl = /oauth/reset
#gitBasicAuth = true
[index]
type = LUCENE
[sendemail]
smtpServer = localhost
[sshd]
listenAddress = *:29418
#listenAddress = off
[httpd]
listenUrl = proxy-http://*:8080/
[cache]
directory = cache
[container]
user = gerrit
javaOptions = "-Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance"
javaOptions = "-Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance"
javaOptions = -Djava.security.egd=file:/dev/./urandom
[receive]
enableSignedPush = false
[lfs]
plugin = lfs
[plugin "gerrit-oauth-provider-github-oauth"]
fix-legacy-user-id = false
[plugin "gerrit-oauth-provider-google-oauth"]
fix-legacy-user-id = false
[plugin "gerrit-oauth-provider-bitbucket-oauth"]
fix-legacy-user-id = false
[plugin "gerrit-oauth-provider-cas-oauth"]
fix-legacy-user-id = false
[plugin "verify-status"]
dbType = h2
database = /var/gerrit/db/CiDB
[noteDb "changes"]
autoMigrate = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment