system-config/playbooks/roles/matrix-gerritbot/templates/docker-compose.yaml.j2

32 lines
1.1 KiB
Django/Jinja

# Version 2 is the latest that is supported by docker-compose in
# Ubuntu Xenial.
version: '2'
services:
gerritbot-matrix:
image: {{ gerritbot_matrix_image }}
network_mode: host
user: "{{ gerritbot_uid }}:{{ gerritbot_gid }}"
restart: always
logging:
driver: syslog
options:
tag: "docker-matrix-gerritbot"
environment:
MATRIX_TOKEN: {{ gerritbot_matrix_access_token }}
MATRIX_IDENTITY_TOKEN: {{ gerritbot_matrix_identity_token }}
volumes:
- /var/lib/matrix-gerritbot/config:/config:ro
- /var/lib/matrix-gerritbot/ssh:/home/bot/.ssh:ro
healthcheck:
test: "gerritbot-matrix check {{ gerritbot_matrix_prometheus_port }}"
retries: 6
timeout: "5s"
command: >-
--gerrit-host {{ gerritbot_gerrit_host }}
--gerrit-user {{ gerritbot_gerrit_user }}
--homeserver-url {{ gerritbot_matrix_homeserver }}
--identity-url {{ gerritbot_matrix_identityserver }}
--config-file /config/gerritbot.dhall
--monitoring-port {{ gerritbot_matrix_prometheus_port }}