Verified Commit 245bda28 authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig)
Browse files

matrix: Move IRC bridge state to PostgreSQL

parent b8456f78
local all postgres peer
host all postgres md5
host all postgres ::1/128 md5
local sameuser all md5
host sameuser all md5
host sameuser all ::1/128 md5
local irc synapse md5
......@@ -17,7 +17,6 @@
file: path={{ item }} state=directory owner=synapse group=synapse mode=0700
- /var/lib/synapse
- /var/lib/synapse/irc-nedb
- /var/lib/synapse/media_store
- name: make virtualenv
......@@ -62,6 +61,11 @@
- restart matrix-appservice-irc
- name: install pg_hba.conf
copy: src=pg_hba.conf dest=/var/lib/postgres/data/pg_hba.conf owner=postgres group=postgres mode=0600
- restart postgres
- name: add synapse postgres db
postgresql_db: db=synapse
become: yes
......@@ -69,7 +73,13 @@
become_method: su
- name: add synapse postgres user
postgresql_user: db=synapse name=synapse password={{ vault_postgres_users.synapse }} encrypted=true
postgresql_user: db=synapse user=synapse password={{ vault_postgres_users.synapse }}
become: yes
become_user: postgres
become_method: su
- name: add irc postgres db
postgresql_db: db=irc
become: yes
become_user: postgres
become_method: su
......@@ -497,8 +497,8 @@ sentry:
# Use an external database to store bridge state.
# database engine (must be 'postgres' or 'nedb'). Default: nedb
engine: "nedb"
engine: "postgres"
# Either a PostgreSQL connection string, or a path to the NeDB storage directory.
# For postgres, it must start with postgres://
# For NeDB, it must start with nedb://. The path is relative to the project directory.
connectionString: "nedb:///var/lib/synapse/irc-nedb"
connectionString: "socket://synapse:{{ vault_postgres_users.synapse }}@/run/postgresql?db=irc"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment