blob: a18b21b3afe8e14a309a14a5da6bf2d7dad43ac9 [file] [log] [blame]
[gerrit]
basePath = git
canonicalWebUrl = http://localhost
serverId = 0f56469f-dfe4-4f28-aca7-803eba7845e0
instanceId = {{ GERRIT_INSTANCE_ID }}
{% if MULTISITE_ENABLED is defined and MULTISITE_ENABLED == "true" %}
installDbModule = com.googlesource.gerrit.plugins.multisite.GitModule
installModule = com.googlesource.gerrit.plugins.multisite.Module
installModule = com.gerritforge.gerrit.eventbroker.BrokerApiModule
{% endif %}
[core]
packedGitLimit = {{ JGIT_CACHE_SIZE }}
packedGitOpenFiles = {{ JGIT_OPEN_FILES }}
[database]
type = h2
database = db/ReviewDB
[index]
type = LUCENE
[auth]
type = ldap
gitBasicAuth = true
{% if COOKIE_DOMAIN is defined %}
cookiedomain = .{{ COOKIE_DOMAIN }}
{% endif %}
[ldap]
server = {{ LDAP_SERVER }}
username = {{ LDAP_USERNAME }}
accountBase = {{ LDAP_ACCOUNT_BASE }}
accountPattern = {{ LDAP_ACCOUNT_PATTERN }}
accountFullName = displayName
accountEmailAddress = mail
groupBase = {{ LDAP_GROUP_BASE }}
{% if SMTP_SERVER %}
[sendemail]
smtpServer = {{ SMTP_SERVER }}
connectTimeout = 30 s
threadPoolSize = 2
smtpEncryption = {{ SMTP_ENCRYPTION }}
smtpServerPort = {{ SMTP_SERVER_PORT }}
sslVerify = {{ SMTP_SSL_VERIFY }}
smtpUser = {{ SMTP_USER }}
enable = true
from = ${user} (Gerrit) <gerrit@{{ SMTP_DOMAIN }}>
{% endif %}
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = http://*:8080/
filterClass = com.googlesource.gerrit.plugins.ootb.FirstTimeRedirect
firstTimeRedirectUrl = /login/%23%2F?account_id=1000000
requestLog = true
[cache]
directory = cache
[plugins]
allowRemoteAdmin = true
[container]
heapLimit = {{ GERRIT_HEAP_LIMIT }}
javaOptions = "-Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance"
javaOptions = "-Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance"
javaOptions = "-verbose:gc -XX:+PrintGCDetails -Xloggc:/var/gerrit/logs/gc_log"
user = gerrit
javaHome = /usr/lib/jvm/jre
javaOptions = -Djava.security.egd=file:/dev/./urandom
[receive]
enableSignedPush = false
{% if METRICS_CLOUDWATCH_ENABLED == "true" %}
[plugin "metrics-reporter-cloudwatch"]
namespace = {{ METRICS_CLOUDWATCH_NAMESPACE }}
rate = {{ METRICS_CLOUDWATCH_RATE }}
jvmMetrics = {{ METRICS_CLOUDWATCH_JVM_ENABLED }}
initialDelay = {{ METRICS_CLOUDWATCH_INITIAL_DELAY }}
dryRun = {{ METRICS_CLOUDWATCH_DRY_RUN }}
{%- if METRICS_CLOUDWATCH_EXCLUDE_METRICS_LIST is defined and METRICS_CLOUDWATCH_EXCLUDE_METRICS_LIST|length %}
{%- set excludedMetricsList = METRICS_CLOUDWATCH_EXCLUDE_METRICS_LIST.split(',') %}
{%- for excluded in excludedMetricsList %}
excludeMetrics = {{ excluded }}
{%- endfor %}
{% endif %}
{% endif %}
{% if PROMETHEUS_BEARER_TOKEN is defined %}
[plugin "javamelody"]
allowTopMenu = true
prometheusBearerToken = {{ PROMETHEUS_BEARER_TOKEN }}
storage-directory = data/javamelody
[plugin "metrics-reporter-prometheus"]
prometheusBearerToken = {{ PROMETHEUS_BEARER_TOKEN }}
excludeMetrics = caches/.*
{% endif %}
{% if MULTISITE_ENABLED is defined and MULTISITE_ENABLED == "true" %}
[plugin "kafka-events"]
sendAsync = true
bootstrapServers = {{ MULTISITE_KAFKA_BROKERS }}
groupId = {{ GERRIT_INSTANCE_ID }}
numberOfSubscribers = 6
autoCommitIntervalMs = 1000
maxRequestSize = 10485760
securityProtocol = SSL
{% endif %}