From 77b919aec690a48b6c9ffd10f66711edbfa72966 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 25 Jan 2020 10:04:21 +0200 Subject: [PATCH] Become compatible with official matrix-appservice-irc Docker image This change allows us to work with both our existing Docker image (`tedomum/matrix-appservice-irc:latest`) and with the official Docker image (`matrixdotorg/matrix-appservice-irc`). The actual change to the official Docker image requires more testing and will be done separately. --- roles/matrix-bridge-appservice-irc/tasks/setup_install.yml | 6 ++++-- .../templates/systemd/matrix-appservice-irc.service.j2 | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/roles/matrix-bridge-appservice-irc/tasks/setup_install.yml b/roles/matrix-bridge-appservice-irc/tasks/setup_install.yml index f3340094..e2c2c2b6 100644 --- a/roles/matrix-bridge-appservice-irc/tasks/setup_install.yml +++ b/roles/matrix-bridge-appservice-irc/tasks/setup_install.yml @@ -98,13 +98,15 @@ --cap-drop=ALL -v {{ matrix_appservice_irc_config_path }}:/config:z -v {{ matrix_appservice_irc_data_path }}:/data:z + --entrypoint=/bin/bash {{ matrix_appservice_irc_docker_image }} - node app.js + -c + 'node app.js -r -f /config/registration-template.yaml -u "http://matrix-appservice-irc:9999" -c /config/config.yaml - -l irc_bot + -l irc_bot' changed_when: false - name: Read Appservice IRC registration-template.yaml diff --git a/roles/matrix-bridge-appservice-irc/templates/systemd/matrix-appservice-irc.service.j2 b/roles/matrix-bridge-appservice-irc/templates/systemd/matrix-appservice-irc.service.j2 index 596a6005..53e5b8e3 100644 --- a/roles/matrix-bridge-appservice-irc/templates/systemd/matrix-appservice-irc.service.j2 +++ b/roles/matrix-bridge-appservice-irc/templates/systemd/matrix-appservice-irc.service.j2 @@ -30,8 +30,9 @@ ExecStart=/usr/bin/docker run --rm --name matrix-appservice-irc \ {% for arg in matrix_appservice_irc_container_extra_arguments %} {{ arg }} \ {% endfor %} + --entrypoint=/bin/bash \ {{ matrix_appservice_irc_docker_image }} \ - -c /config/config.yaml -f /config/registration.yaml -p 9999 + -c 'node app.js -c /config/config.yaml -f /config/registration.yaml -p 9999' ExecStop=-/usr/bin/docker kill matrix-appservice-irc ExecStop=-/usr/bin/docker rm matrix-appservice-irc