Add (Postgres + SQLite) support to matrix-mautrix-facebook bridge

This commit is contained in:
Slavi Pantaleev
2020-12-14 11:50:42 +02:00
parent 5dba0c038b
commit 2d99ade72f
4 changed files with 52 additions and 1 deletions

View File

@ -32,6 +32,35 @@ matrix_mautrix_facebook_systemd_wanted_services_list: []
matrix_mautrix_facebook_appservice_token: ''
matrix_mautrix_facebook_homeserver_token: ''
# Database-related configuration fields.
#
# To use SQLite, stick to these defaults.
#
# To use Postgres:
# - change the engine (`matrix_mautrix_facebook_database_engine: 'postgres'`)
# - adjust your database credentials via the `matrix_mautrix_facebook_postgres_*` variables
matrix_mautrix_facebook_database_engine: 'sqlite'
matrix_mautrix_facebook_sqlite_database_path_local: "{{ matrix_mautrix_facebook_data_path }}/mautrix-facebook.db"
matrix_mautrix_facebook_sqlite_database_path_in_container: "/data/mautrix-facebook.db"
matrix_mautrix_facebook_postgres_username: 'matrix_mautrix_facebook'
matrix_mautrix_facebook_postgres_password: 'some-password'
matrix_mautrix_facebook_postgres_hostname: 'matrix-postgres'
matrix_mautrix_facebook_postgres_port: 5432
matrix_mautrix_facebook_postgres_db_name: 'matrix_mautrix_facebook'
matrix_mautrix_facebook_postgres_connection_string: 'postgresql://{{ matrix_mautrix_facebook_postgres_username }}:{{ matrix_mautrix_facebook_postgres_password }}@{{ matrix_mautrix_facebook_postgres_hostname }}:{{ matrix_mautrix_facebook_postgres_port }}/{{ matrix_mautrix_facebook_postgres_db_name }}'
matrix_mautrix_facebook_appservice_database: "{{
{
'sqlite': matrix_mautrix_facebook_sqlite_database_path_in_container,
'postgres': matrix_mautrix_facebook_postgres_connection_string,
}[matrix_mautrix_facebook_database_engine]
}}"
# Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth).
matrix_mautrix_facebook_login_shared_secret: ''