![Ian Wienand](/assets/img/avatar_default.png)
After I replace the docker packages some services I thought would come back did not. Lodegit seems to be an oversight, add restart always. Also make sure the ZK containers start themselves. I believe with Gerrit we've made the choice to not start automatically due to the general high-touch nature of restarts. Keep the database consistent and remove the auto restart there. Change-Id: I98fa3055ac269564ed96570df0700b2aad24e4d2
59 lines
1.8 KiB
Django/Jinja
59 lines
1.8 KiB
Django/Jinja
version: '2'
|
|
services:
|
|
{% if gerrit_reviewdb_database_type == 'mariadb_container' %}
|
|
mariadb:
|
|
image: docker.io/library/mariadb:10.4
|
|
network_mode: host
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: "{{ gerrit_reviewdb_mariadb_password }}"
|
|
MYSQL_DATABASE: "{{ gerrit_reviewdb_mariadb_dbname }}"
|
|
MYSQL_USER: "{{ gerrit_reviewdb_mariadb_username }}"
|
|
MYSQL_PASSWORD: "{{ gerrit_reviewdb_mariadb_password }}"
|
|
volumes:
|
|
# NOTE(ianw) : mounted under /home/gerrit2 (rather than more
|
|
# usual /var/ in our configs) to keep everything together on the
|
|
# storage attached at /home/gerrit2 on the server.
|
|
- /home/gerrit2/reviewdb:/var/lib/mysql
|
|
logging:
|
|
driver: syslog
|
|
options:
|
|
tag: "docker-mariadb"
|
|
{% endif %}
|
|
gerrit:
|
|
image: {{ gerrit_container_image }}
|
|
{% if gerrit_reviewdb_database_type == 'mariadb_container' %}
|
|
depends_on:
|
|
- mariadb
|
|
command: ["/wait-for-it.sh", "127.0.0.1:3306", "--", "/run-gerrit.sh"]
|
|
{% endif %}
|
|
network_mode: host
|
|
user: gerrit
|
|
stop_signal: SIGHUP
|
|
stop_grace_period: 5m
|
|
volumes:
|
|
{% for volume in gerrit_container_volumes %}
|
|
- {{ volume }}
|
|
{% endfor %}
|
|
environment:
|
|
JAVA_OPTIONS: >-
|
|
-Xlog:gc*:file=/var/gerrit/logs/jvm_gc.log:time,uptime,tid,level,tags:filecount=10,filesize=20M
|
|
{% if gerrit_heap_limit is defined %}
|
|
-Xmx{{ gerrit_heap_limit }}
|
|
{% endif %}
|
|
ulimits:
|
|
core: 0
|
|
nofile: {{ gerrit_packed_git_open_files * 2 }}
|
|
cap_add:
|
|
- SYS_PTRACE
|
|
# Utility "service" to allow us to run ad-hoc commands
|
|
shell:
|
|
image: {{ gerrit_container_image }}
|
|
restart: 'no'
|
|
command: /bin/true
|
|
network_mode: host
|
|
user: gerrit
|
|
volumes:
|
|
{% for volume in gerrit_container_volumes %}
|
|
- {{ volume }}
|
|
{% endfor %}
|