Filip Pytloun | e7d4f86 | 2017-08-04 13:11:51 +0200 | [diff] [blame] | 1 | classes: |
| 2 | - system.docker |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 3 | parameters: |
| 4 | _param: |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 5 | gerrit_ldap_server: "" |
| 6 | gerrit_ldap_bind_user: "" |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 7 | gerrit_ldap_account_base: "" |
| 8 | gerrit_ldap_group_base: "" |
Jiri Broulik | 7560930 | 2017-09-11 19:33:31 +0200 | [diff] [blame] | 9 | gerrit_http_listen_url: http://*:8080/ |
Filip Pytloun | e7d4f86 | 2017-08-04 13:11:51 +0200 | [diff] [blame] | 10 | gerrit_extra_opts: "" |
Ivan Berezovskiy | 45b6569 | 2018-10-26 19:40:24 +0400 | [diff] [blame] | 11 | gerrit_db_publish_port: 13306 |
| 12 | gerrit_publish_port: 18083 |
| 13 | gerrit_ssh_publish_port: 29417 |
Vyacheslav Struk | 9c30182 | 2019-06-21 15:56:43 +0300 | [diff] [blame] | 14 | gerrit_http_request_log: "" |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 15 | docker: |
| 16 | client: |
| 17 | stack: |
| 18 | gerrit: |
Oleksii Molchanov | 2dded63 | 2020-07-28 23:34:03 +0300 | [diff] [blame] | 19 | version: '3.7' |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 20 | service: |
| 21 | server: |
| 22 | deploy: |
| 23 | restart_policy: |
| 24 | condition: any |
| 25 | image: ${_param:docker_image_gerrit} |
| 26 | ports: |
Ivan Berezovskiy | 45b6569 | 2018-10-26 19:40:24 +0400 | [diff] [blame] | 27 | - ${_param:gerrit_publish_port}:8080 |
| 28 | - ${_param:gerrit_ssh_publish_port}:29418 |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 29 | volumes: |
| 30 | - /srv/volumes/gerrit:/var/gerrit/review_site |
Denis Egorenko | 8458f97 | 2019-07-10 16:17:16 +0400 | [diff] [blame] | 31 | - /etc/ssl/certs/java/cacerts:/etc/ssl/certs/java/cacerts:ro |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 32 | depends_on: |
| 33 | - db |
Oleksii Molchanov | 2dded63 | 2020-07-28 23:34:03 +0300 | [diff] [blame] | 34 | secrets: |
| 35 | - mysql-gerrit |
| 36 | - ldap-gerrit |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 37 | 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 Molchanov | 2dded63 | 2020-07-28 23:34:03 +0300 | [diff] [blame] | 42 | DB_ENV_MYSQL_PASSWORD_FILE: "/run/secrets/mysql-gerrit" |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 43 | 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 Molchanov | 2dded63 | 2020-07-28 23:34:03 +0300 | [diff] [blame] | 50 | LDAP_PASSWORD_FILE: "/run/secrets/ldap-gerrit" |
Filip Pytloun | e6673c4 | 2017-05-11 16:43:03 +0200 | [diff] [blame] | 51 | WEBURL: ${_param:gerrit_public_host} |
Jiri Broulik | 7560930 | 2017-09-11 19:33:31 +0200 | [diff] [blame] | 52 | HTTPD_LISTENURL: ${_param:gerrit_http_listen_url} |
Vyacheslav Struk | 9c30182 | 2019-06-21 15:56:43 +0300 | [diff] [blame] | 53 | HTTPD_REQUESTLOG: ${_param:gerrit_http_request_log} |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 54 | CANLOADINIFRAME: "true" |
Denis Egorenko | 89ebc6d | 2019-10-29 13:09:51 +0400 | [diff] [blame] | 55 | IGNORE_VERSIONCHECK: "false" |
Denis Egorenko | bfd6403 | 2019-07-11 16:22:59 +0400 | [diff] [blame] | 56 | JAVA_OPTIONS: "-Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts ${_param:gerrit_extra_opts}" |
Filip Pytloun | e7d4f86 | 2017-08-04 13:11:51 +0200 | [diff] [blame] | 57 | https_proxy: ${_param:docker_https_proxy} |
| 58 | http_proxy: ${_param:docker_http_proxy} |
| 59 | no_proxy: ${_param:docker_no_proxy} |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 60 | db: |
Oleksii Molchanov | 2dded63 | 2020-07-28 23:34:03 +0300 | [diff] [blame] | 61 | secrets: |
| 62 | - mysql-gerrit |
| 63 | - mysql-root |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 64 | environment: |
| 65 | MYSQL_USER: gerrit |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 66 | MYSQL_DATABASE: gerrit |
Oleksii Molchanov | 2dded63 | 2020-07-28 23:34:03 +0300 | [diff] [blame] | 67 | MYSQL_ROOT_PASSWORD_FILE: "/run/secrets/mysql-root" |
| 68 | MYSQL_PASSWORD_FILE: "/run/secrets/mysql-gerrit" |
Filip Pytloun | 6d4c51a | 2017-05-02 11:38:34 +0200 | [diff] [blame] | 69 | MYSQL_START_TIMEOUT: 300 |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 70 | deploy: |
| 71 | restart_policy: |
| 72 | condition: any |
| 73 | image: "${_param:docker_image_mysql}" |
| 74 | ports: |
Ivan Berezovskiy | 45b6569 | 2018-10-26 19:40:24 +0400 | [diff] [blame] | 75 | - ${_param:gerrit_db_publish_port}:3306 |
Filip Pytloun | 7d6144a | 2017-04-13 13:36:45 +0200 | [diff] [blame] | 76 | volumes: |
| 77 | - /srv/volumes/mysql:/var/lib/mysql |
Oleksii Molchanov | 2dded63 | 2020-07-28 23:34:03 +0300 | [diff] [blame] | 78 | 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} |