add postgres support for mx-puppet-* with fallback to sqlite in role and migration notice

This commit is contained in:
2020-12-14 12:38:51 +01:00
parent 087dbe4ddc
commit 5d70bc1376
18 changed files with 245 additions and 14 deletions

View File

@ -54,15 +54,18 @@ provisioning:
apiPrefix: /_matrix/provision
database:
{% if matrix_mx_puppet_twitter_database_engine == 'postgres' %}
# Use Postgres as a database backend
# If set, will be used instead of SQLite3
# Connection string to connect to the Postgres instance
# with username "user", password "pass", host "localhost" and database name "dbname".
# Modify each value as necessary
connString: "postgres://matrix_puppet_twitter:{{ matrix_additional_databases | selectattr('name', 'equalto', 'matrix_puppet_twitter') | map(attribute='pass') | first }}@{{ matrix_postgres_connection_hostname }}/matrix_puppet_twitter?sslmode=disable"
connString: {{ matrix_mx_puppet_twitter_database_connString | to_json }}
{% else %}
# Use SQLite3 as a database backend
# The name of the database file
#filename: /data/database.db
filename: {{ matrix_mx_puppet_twitter_database_file }}
{% endif %}
logging:
# Log level of console output