1
0
Fork 0

Use PostgreSQL

This commit is contained in:
Alex Kotov 2020-07-03 17:35:16 +05:00
parent 6310e96c1a
commit 63a739f83f
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
3 changed files with 34 additions and 0 deletions

View file

@ -25,6 +25,20 @@ matrix__admin_contact: 'mailto:kotovalexarian@gmail.com'
matrix__nginx__ssl_cert: '/etc/letsencrypt/live/matrix.crypto-libertarian.com/fullchain.pem'
matrix__nginx__ssl_key: '/etc/letsencrypt/live/matrix.crypto-libertarian.com/privkey.pem'
matrix__synapse__pg_enable: true
matrix__synapse__pg_host: 'postgres.crypto-libertarian.com'
matrix__synapse__pg_username: 'matrix_synapse'
matrix__synapse__pg_database: 'matrix_synapse'
matrix__synapse__pg_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
35643162356165376337313538396466333534613666323865636363656264373539646135303136
3263643435383866643161333931383430313133633331370a636639303366616132616164306537
31333162356131633635303931353931633763386238636461343437363861343565616430666137
3738616138303739350a646331323639306464656332383233333664653561313934666366623939
65373839653630353830326336376534313136313735343532373232653536653363366132333363
6639346134356664313434373664653734366361633935633230
matrix__synapse__signing_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
39396138396261633738353039613533343139373763383332373462303136643963646663383435

View file

@ -8,6 +8,13 @@ matrix__admin_contact: 'mailto:user@example.com'
matrix__nginx__ssl_cert: '/etc/letsencrypt/live/matrix.example.com/fullchain.pem'
matrix__nginx__ssl_key: '/etc/letsencrypt/live/matrix.example.com/privkey.pem'
matrix__synapse__pg_enable: false
matrix__synapse__pg_host: 'postgres.example.com'
matrix__synapse__pg_port: 5432
matrix__synapse__pg_username: ''
matrix__synapse__pg_password: ''
matrix__synapse__pg_database: ''
matrix__synapse__signing_key: ''
matrix__synapse__reg_secret: ''
matrix__synapse__macaroon_secret: ''

View file

@ -36,7 +36,20 @@
#
# For more information on using Synapse with Postgres, see `docs/postgres.md`.
#
{% if not matrix__synapse__pg_enable %}
database:
name: sqlite3
args:
database: '{{ matrix__synapse__db_file }}'
{% else %}
database:
name: psycopg2
args:
host: '{{ matrix__synapse__pg_host }}'
port: {{ matrix__synapse__pg_port }}
user: '{{ matrix__synapse__pg_username }}'
password: '{{ matrix__synapse__pg_password }}'
database: '{{ matrix__synapse__pg_database }}'
cp_min: 5
cp_max: 10
{% endif %}