From 2d7c427504410199d81c278dccf000b1c8def936 Mon Sep 17 00:00:00 2001 From: Charles Wright Date: Thu, 4 Aug 2022 13:16:32 -0500 Subject: [PATCH] Fixes from a first trial run --- roles/matrix-conduit/defaults/main.yml | 4 +++- roles/matrix-conduit/templates/conduit/conduit.toml.j2 | 6 +++--- .../templates/conduit/systemd/matrix-conduit.service.j2 | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/roles/matrix-conduit/defaults/main.yml b/roles/matrix-conduit/defaults/main.yml index a4a9289df..05746651c 100644 --- a/roles/matrix-conduit/defaults/main.yml +++ b/roles/matrix-conduit/defaults/main.yml @@ -11,10 +11,12 @@ matrix_conduit_docker_image_force_pull: "{{ matrix_conduit_docker_image.endswith matrix_conduit_base_path: "{{ matrix_base_data_path }}/conduit" matrix_conduit_config_dir_path: "{{ matrix_conduit_base_path }}/config" -matrix_conduit_storage_path: "{{ matrix_conduit_base_path }}/storage" +matrix_conduit_data_dir_path: "{{ matrix_conduit_base_path }}/storage" matrix_conduit_port_number: 6167 +matrix_conduit_tmp_directory_size_mb: 500 + # List of systemd services that matrix-conduit.service depends on matrix_conduit_systemd_required_services_list: ["docker.service"] diff --git a/roles/matrix-conduit/templates/conduit/conduit.toml.j2 b/roles/matrix-conduit/templates/conduit/conduit.toml.j2 index a6819ef40..f92910e13 100644 --- a/roles/matrix-conduit/templates/conduit/conduit.toml.j2 +++ b/roles/matrix-conduit/templates/conduit/conduit.toml.j2 @@ -35,12 +35,12 @@ port = {{ matrix_conduit_port_number }} max_request_size = {{ matrix_conduit_max_request_size }} # Enables registration. If set to false, no users can register on this server. -allow_registration = {{ matrix_conduit_allow_registration }} +allow_registration = {{ matrix_conduit_allow_registration | to_json | replace("\"", "") }} -allow_federation = {{ matrix_conduit_allow_federation }} +allow_federation = {{ matrix_conduit_allow_federation | to_json | replace("\"", "") }} # Enable the display name lightning bolt on registration. -enable_lightning_bolt = {{ matrix_conduit_enable_lightning_bolt }} +enable_lightning_bolt = {{ matrix_conduit_enable_lightning_bolt | to_json | replace("\"", "") }} trusted_servers = {{ matrix_conduit_trusted_servers }} diff --git a/roles/matrix-conduit/templates/conduit/systemd/matrix-conduit.service.j2 b/roles/matrix-conduit/templates/conduit/systemd/matrix-conduit.service.j2 index 195e5d587..2d4d24533 100644 --- a/roles/matrix-conduit/templates/conduit/systemd/matrix-conduit.service.j2 +++ b/roles/matrix-conduit/templates/conduit/systemd/matrix-conduit.service.j2 @@ -19,8 +19,9 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-conduit \ --read-only \ --tmpfs=/tmp:rw,noexec,nosuid,size={{ matrix_conduit_tmp_directory_size_mb }}m \ --network={{ matrix_docker_network }} \ + --env CONDUIT_CONFIG=/etc/matrix-conduit/conduit.toml \ + --mount type=bind,src={{ matrix_conduit_data_dir_path }},dst=/var/lib/matrix-conduit \ --mount type=bind,src={{ matrix_conduit_config_dir_path }},dst=/etc/matrix-conduit,ro \ - --mount type=bind,src={{ matrix_conduit_data_dir_path }},dst=/var/lib/conduit \ {% for arg in matrix_conduit_container_extra_arguments %} {{ arg }} \ {% endfor %}