blob: 2ce9444353432bd8370598c9d7653614d5824a31 [file] [log] [blame]
classes:
- system.docker
parameters:
_param:
gerrit_ldap_server: ""
gerrit_ldap_bind_user: ""
gerrit_ldap_account_base: ""
gerrit_ldap_group_base: ""
gerrit_http_listen_url: http://*:8080/
gerrit_extra_opts: ""
gerrit_db_publish_port: 13306
gerrit_publish_port: 18083
gerrit_ssh_publish_port: 29417
gerrit_http_request_log: ""
docker:
client:
stack:
gerrit:
version: '3.7'
service:
server:
deploy:
restart_policy:
condition: any
image: ${_param:docker_image_gerrit}
ports:
- ${_param:gerrit_publish_port}:8080
- ${_param:gerrit_ssh_publish_port}:29418
volumes:
- /srv/volumes/gerrit:/var/gerrit/review_site
- /etc/ssl/certs/java/cacerts:/etc/ssl/certs/java/cacerts:ro
depends_on:
- db
secrets:
- mysql-gerrit
- ldap-gerrit
environment:
#GERRIT_INIT_ARGS: ""
DATABASE_TYPE: "mysql"
DB_PORT_3306_TCP_ADDR: ${_param:cluster_vip_address}
DB_ENV_MYSQL_USER: gerrit
DB_ENV_MYSQL_PASSWORD_FILE: "/run/secrets/mysql-gerrit"
DB_ENV_MYSQL_DB: gerrit
AUTH_TYPE: ${_param:gerrit_auth_type}
LDAP_SERVER: ${_param:gerrit_ldap_server}
LDAP_ACCOUNTPATTERN: 'uid={username}'
LDAP_ACCOUNTBASE: ${_param:gerrit_ldap_account_base}
LDAP_GROUPBASE: ${_param:gerrit_ldap_group_base}
LDAP_USERNAME: ${_param:gerrit_ldap_bind_user}
LDAP_PASSWORD_FILE: "/run/secrets/ldap-gerrit"
WEBURL: ${_param:gerrit_public_host}
HTTPD_LISTENURL: ${_param:gerrit_http_listen_url}
HTTPD_REQUESTLOG: ${_param:gerrit_http_request_log}
CANLOADINIFRAME: "true"
IGNORE_VERSIONCHECK: "false"
JAVA_OPTIONS: "-Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts ${_param:gerrit_extra_opts}"
https_proxy: ${_param:docker_https_proxy}
http_proxy: ${_param:docker_http_proxy}
no_proxy: ${_param:docker_no_proxy}
db:
secrets:
- mysql-gerrit
- mysql-root
environment:
MYSQL_USER: gerrit
MYSQL_DATABASE: gerrit
MYSQL_ROOT_PASSWORD_FILE: "/run/secrets/mysql-root"
MYSQL_PASSWORD_FILE: "/run/secrets/mysql-gerrit"
MYSQL_START_TIMEOUT: 300
deploy:
restart_policy:
condition: any
image: "${_param:docker_image_mysql}"
ports:
- ${_param:gerrit_db_publish_port}:3306
volumes:
- /srv/volumes/mysql:/var/lib/mysql
secrets:
mysql-root:
external: true
value: ${_param:mysql_admin_password}
mysql-gerrit:
external: true
value: ${_param:mysql_gerrit_password}
ldap-gerrit:
external: true
value: ${_param:gerrit_ldap_bind_password}