system-config/playbooks/roles/matrix-gerritbot/templates/docker-compose.yaml.j2
Tristan Cacqueray 990b9c1905 Update the gerritbot-matrix image to support arbitrary uid with docker
This change pulls in https://softwarefactory-project.io/r/c/software-factory/gerritbot-matrix/+/23348 to achieve abritary uid with docker.

Change-Id: I43198af4feebd7f175ffdede376e2e4d19928d62
2021-12-06 20:36:11 +00:00

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 }}