From f1c0321a8ce94f5e86c8b3fc0aecc9c4dac03f9a Mon Sep 17 00:00:00 2001 From: array-in-a-matrix Date: Sat, 18 Mar 2023 03:22:30 -0400 Subject: [PATCH 1/2] add relay api database for dendrite --- group_vars/matrix_servers | 4 ++++ roles/custom/matrix-dendrite/defaults/main.yml | 1 + roles/custom/matrix-dendrite/tasks/validate_config.yml | 1 + .../matrix-dendrite/templates/dendrite/dendrite.yaml.j2 | 6 ++++++ 4 files changed, 12 insertions(+) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 18ad756c..6be30d7e 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -2741,6 +2741,10 @@ devture_postgres_managed_databases_auto: | 'name': matrix_dendrite_user_api_database, 'username': matrix_dendrite_database_user, 'password': matrix_dendrite_database_password, + },{ + 'name': matrix_dendrite_relay_api_database, + 'username': matrix_dendrite_relay_api_user, + 'password': matrix_dendrite_relay_api_password, },{ 'name': matrix_dendrite_push_server_database, 'username': matrix_dendrite_database_user, diff --git a/roles/custom/matrix-dendrite/defaults/main.yml b/roles/custom/matrix-dendrite/defaults/main.yml index 35793f49..41cd35ed 100644 --- a/roles/custom/matrix-dendrite/defaults/main.yml +++ b/roles/custom/matrix-dendrite/defaults/main.yml @@ -157,6 +157,7 @@ matrix_dendrite_room_database: "dendrite_room" matrix_dendrite_sync_api_database: "dendrite_syncapi" matrix_dendrite_user_api_database: "dendrite_userapi" matrix_dendrite_push_server_database: "dendrite_pushserver" +matrix_dendrite_relay_api_database: "dendrite_relayapi" matrix_dendrite_mscs_database: "dendrite_mscs" matrix_dendrite_client_api_turn_uris: [] diff --git a/roles/custom/matrix-dendrite/tasks/validate_config.yml b/roles/custom/matrix-dendrite/tasks/validate_config.yml index 1f1b3e41..0b1540bb 100644 --- a/roles/custom/matrix-dendrite/tasks/validate_config.yml +++ b/roles/custom/matrix-dendrite/tasks/validate_config.yml @@ -33,4 +33,5 @@ - {'old': 'matrix_dendrite_userapi_auto_join_rooms', 'new': 'matrix_dendrite_user_api_auto_join_rooms'} - {'old': 'matrix_dendrite_federationapi_database', 'new': 'matrix_dendrite_federation_api_database'} - {'old': 'matrix_dendrite_pushserver_database', 'new': 'matrix_dendrite_push_server_database'} + - {'old': 'matrix_dendrite_relayapi_database', 'new': 'matrix_dendrite_relay_api_database'} - {'old': 'matrix_dendrite_keyserver_database', 'new': 'matrix_dendrite_key_server_database'} diff --git a/roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 b/roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 index 89821de1..3c1e56e5 100644 --- a/roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 +++ b/roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 @@ -399,6 +399,12 @@ push_server: max_idle_conns: 2 conn_max_lifetime: -1 +# +# +relay_api: + database: + connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_relay_api_database }}?sslmode=disable + # Configuration for Opentracing. # See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on # how this works and how to set it up. From dd1712d45731675bb05bcf5e7c71922faeca62fd Mon Sep 17 00:00:00 2001 From: Array in a Matrix Date: Sat, 18 Mar 2023 03:43:12 -0400 Subject: [PATCH 2/2] fix typo i was sleepy lol --- group_vars/matrix_servers | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 6be30d7e..ef36a06c 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -2743,8 +2743,8 @@ devture_postgres_managed_databases_auto: | 'password': matrix_dendrite_database_password, },{ 'name': matrix_dendrite_relay_api_database, - 'username': matrix_dendrite_relay_api_user, - 'password': matrix_dendrite_relay_api_password, + 'username': matrix_dendrite_database_user, + 'password': matrix_dendrite_database_password, },{ 'name': matrix_dendrite_push_server_database, 'username': matrix_dendrite_database_user,