Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
infrastructure
Commits
245bda28
Verified
Commit
245bda28
authored
Jun 26, 2020
by
Jan Alexander Steffens (heftig)
Browse files
matrix: Move IRC bridge state to PostgreSQL
parent
b8456f78
Changes
3
Hide whitespace changes
Inline
Side-by-side
roles/matrix/files/pg_hba.conf
0 → 100644
View file @
245bda28
local
all
postgres
peer
host
all
postgres
127
.
0
.
0
.
1
/
32
md5
host
all
postgres
::
1
/
128
md5
local
sameuser
all
md5
host
sameuser
all
127
.
0
.
0
.
1
/
32
md5
host
sameuser
all
::
1
/
128
md5
local
irc
synapse
md5
roles/matrix/tasks/main.yml
View file @
245bda28
...
...
@@ -17,7 +17,6 @@
file
:
path={{ item }} state=directory owner=synapse group=synapse mode=0700
with_items
:
-
/var/lib/synapse
-
/var/lib/synapse/irc-nedb
-
/var/lib/synapse/media_store
-
name
:
make virtualenv
...
...
@@ -62,6 +61,11 @@
notify
:
-
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
notify
:
-
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
...
...
roles/matrix/templates/irc-bridge.yaml.j2
View file @
245bda28
...
...
@@ -497,8 +497,8 @@ sentry:
# Use an external database to store bridge state.
database:
# 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
"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment