diff --git a/roles/docker-matrix-compose/tasks/main.yml b/roles/docker-matrix-compose/tasks/main.yml index 814c0ae5..63a67a37 100644 --- a/roles/docker-matrix-compose/tasks/main.yml +++ b/roles/docker-matrix-compose/tasks/main.yml @@ -22,6 +22,17 @@ database_name: "{{ item.database_name }}" loop: "{{ bridges }}" +# The following taks are necessary because a clean setup is necessary +- name: shut down docker compose project + command: + cmd: docker-compose -p "{{docker_compose_project_name}}" down + chdir: "{{ docker_compose_instance_directory }}" + +- name: "cleanup project folder" + file: + path: "{{docker_compose_instance_directory}}" + state: absent + - name: "create registrations folder" file: path: "{{docker_compose_instance_directory}}registrations" @@ -41,6 +52,7 @@ dest: "{{docker_compose_instance_directory}}{{item.bridge_name}}/config.yaml" notify: docker compose project setup loop: "{{ bridges }}" + notify: docker compose project setup - name: add element configuration template: @@ -50,13 +62,13 @@ - name: add synapse homeserver configuration template: - src: "synapse.homeserver.config.j2" + src: "synapse/homeserver.yaml.j2" dest: "{{docker_compose_instance_directory}}homeserver.yaml" notify: docker compose project setup - name: add synapse log configuration template: - src: "synapse.log.config.j2" + src: "synapse/log.config.j2" dest: "{{docker_compose_instance_directory}}{{synapse_domain}}.log.config" notify: docker compose project setup diff --git a/roles/docker-matrix-compose/templates/docker-compose.yml.j2 b/roles/docker-matrix-compose/templates/docker-compose.yml.j2 index d8bf4dfc..6efb0223 100644 --- a/roles/docker-matrix-compose/templates/docker-compose.yml.j2 +++ b/roles/docker-matrix-compose/templates/docker-compose.yml.j2 @@ -6,7 +6,7 @@ services: synapse: image: matrixdotorg/synapse:latest - container_name: mautrix-synapse + container_name: matrix-synapse restart: {{docker_restart_policy}} logging: driver: journald @@ -25,7 +25,7 @@ services: element: image: vectorim/element-web:latest - container_name: mautrix-element + container_name: matrix-element restart: {{docker_restart_policy}} volumes: - ./element-config.json:/app/config.json diff --git a/roles/docker-matrix-compose/templates/synapse.homeserver.config.j2 b/roles/docker-matrix-compose/templates/synapse/homeserver.yaml.j2 similarity index 100% rename from roles/docker-matrix-compose/templates/synapse.homeserver.config.j2 rename to roles/docker-matrix-compose/templates/synapse/homeserver.yaml.j2 diff --git a/roles/docker-matrix-compose/templates/synapse.log.config.j2 b/roles/docker-matrix-compose/templates/synapse/log.config.j2 similarity index 100% rename from roles/docker-matrix-compose/templates/synapse.log.config.j2 rename to roles/docker-matrix-compose/templates/synapse/log.config.j2