blob: 2ce9444353432bd8370598c9d7653614d5824a31 [file] [log] [blame]
Filip Pytloune7d4f862017-08-04 13:11:51 +02001classes:
2- system.docker
Filip Pytloun7d6144a2017-04-13 13:36:45 +02003parameters:
4 _param:
Filip Pytloun7d6144a2017-04-13 13:36:45 +02005 gerrit_ldap_server: ""
6 gerrit_ldap_bind_user: ""
Filip Pytloun7d6144a2017-04-13 13:36:45 +02007 gerrit_ldap_account_base: ""
8 gerrit_ldap_group_base: ""
Jiri Broulik75609302017-09-11 19:33:31 +02009 gerrit_http_listen_url: http://*:8080/
Filip Pytloune7d4f862017-08-04 13:11:51 +020010 gerrit_extra_opts: ""
Ivan Berezovskiy45b65692018-10-26 19:40:24 +040011 gerrit_db_publish_port: 13306
12 gerrit_publish_port: 18083
13 gerrit_ssh_publish_port: 29417
Vyacheslav Struk9c301822019-06-21 15:56:43 +030014 gerrit_http_request_log: ""
Filip Pytloun7d6144a2017-04-13 13:36:45 +020015 docker:
16 client:
17 stack:
18 gerrit:
Oleksii Molchanov2dded632020-07-28 23:34:03 +030019 version: '3.7'
Filip Pytloun7d6144a2017-04-13 13:36:45 +020020 service:
21 server:
22 deploy:
23 restart_policy:
24 condition: any
25 image: ${_param:docker_image_gerrit}
26 ports:
Ivan Berezovskiy45b65692018-10-26 19:40:24 +040027 - ${_param:gerrit_publish_port}:8080
28 - ${_param:gerrit_ssh_publish_port}:29418
Filip Pytloun7d6144a2017-04-13 13:36:45 +020029 volumes:
30 - /srv/volumes/gerrit:/var/gerrit/review_site
Denis Egorenko8458f972019-07-10 16:17:16 +040031 - /etc/ssl/certs/java/cacerts:/etc/ssl/certs/java/cacerts:ro
Filip Pytloun7d6144a2017-04-13 13:36:45 +020032 depends_on:
33 - db
Oleksii Molchanov2dded632020-07-28 23:34:03 +030034 secrets:
35 - mysql-gerrit
36 - ldap-gerrit
Filip Pytloun7d6144a2017-04-13 13:36:45 +020037 environment:
38 #GERRIT_INIT_ARGS: ""
39 DATABASE_TYPE: "mysql"
40 DB_PORT_3306_TCP_ADDR: ${_param:cluster_vip_address}
41 DB_ENV_MYSQL_USER: gerrit
Oleksii Molchanov2dded632020-07-28 23:34:03 +030042 DB_ENV_MYSQL_PASSWORD_FILE: "/run/secrets/mysql-gerrit"
Filip Pytloun7d6144a2017-04-13 13:36:45 +020043 DB_ENV_MYSQL_DB: gerrit
44 AUTH_TYPE: ${_param:gerrit_auth_type}
45 LDAP_SERVER: ${_param:gerrit_ldap_server}
46 LDAP_ACCOUNTPATTERN: 'uid={username}'
47 LDAP_ACCOUNTBASE: ${_param:gerrit_ldap_account_base}
48 LDAP_GROUPBASE: ${_param:gerrit_ldap_group_base}
49 LDAP_USERNAME: ${_param:gerrit_ldap_bind_user}
Oleksii Molchanov2dded632020-07-28 23:34:03 +030050 LDAP_PASSWORD_FILE: "/run/secrets/ldap-gerrit"
Filip Pytloune6673c42017-05-11 16:43:03 +020051 WEBURL: ${_param:gerrit_public_host}
Jiri Broulik75609302017-09-11 19:33:31 +020052 HTTPD_LISTENURL: ${_param:gerrit_http_listen_url}
Vyacheslav Struk9c301822019-06-21 15:56:43 +030053 HTTPD_REQUESTLOG: ${_param:gerrit_http_request_log}
Filip Pytloun7d6144a2017-04-13 13:36:45 +020054 CANLOADINIFRAME: "true"
Denis Egorenko89ebc6d2019-10-29 13:09:51 +040055 IGNORE_VERSIONCHECK: "false"
Denis Egorenkobfd64032019-07-11 16:22:59 +040056 JAVA_OPTIONS: "-Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts ${_param:gerrit_extra_opts}"
Filip Pytloune7d4f862017-08-04 13:11:51 +020057 https_proxy: ${_param:docker_https_proxy}
58 http_proxy: ${_param:docker_http_proxy}
59 no_proxy: ${_param:docker_no_proxy}
Filip Pytloun7d6144a2017-04-13 13:36:45 +020060 db:
Oleksii Molchanov2dded632020-07-28 23:34:03 +030061 secrets:
62 - mysql-gerrit
63 - mysql-root
Filip Pytloun7d6144a2017-04-13 13:36:45 +020064 environment:
65 MYSQL_USER: gerrit
Filip Pytloun7d6144a2017-04-13 13:36:45 +020066 MYSQL_DATABASE: gerrit
Oleksii Molchanov2dded632020-07-28 23:34:03 +030067 MYSQL_ROOT_PASSWORD_FILE: "/run/secrets/mysql-root"
68 MYSQL_PASSWORD_FILE: "/run/secrets/mysql-gerrit"
Filip Pytloun6d4c51a2017-05-02 11:38:34 +020069 MYSQL_START_TIMEOUT: 300
Filip Pytloun7d6144a2017-04-13 13:36:45 +020070 deploy:
71 restart_policy:
72 condition: any
73 image: "${_param:docker_image_mysql}"
74 ports:
Ivan Berezovskiy45b65692018-10-26 19:40:24 +040075 - ${_param:gerrit_db_publish_port}:3306
Filip Pytloun7d6144a2017-04-13 13:36:45 +020076 volumes:
77 - /srv/volumes/mysql:/var/lib/mysql
Oleksii Molchanov2dded632020-07-28 23:34:03 +030078 secrets:
79 mysql-root:
80 external: true
81 value: ${_param:mysql_admin_password}
82 mysql-gerrit:
83 external: true
84 value: ${_param:mysql_gerrit_password}
85 ldap-gerrit:
86 external: true
87 value: ${_param:gerrit_ldap_bind_password}