Add postgres configuration
This commit is contained in:
parent
a842e9cd1d
commit
bcd7ec714b
@ -26,6 +26,7 @@ matrix_bot_maubot_database_password: ~
|
|||||||
matrix_bot_maubot_database_hostname: 'matrix-postgres'
|
matrix_bot_maubot_database_hostname: 'matrix-postgres'
|
||||||
matrix_bot_maubot_database_port: 5432
|
matrix_bot_maubot_database_port: 5432
|
||||||
matrix_bot_maubot_database_name: matrix_bot_maubot
|
matrix_bot_maubot_database_name: matrix_bot_maubot
|
||||||
|
matrix_bot_maubot_database_uri: 'postgres://{{ matrix_bot_maubot_database_username }}:{{ matrix_bot_maubot_database_password }}@{{ matrix_bot_maubot_database_hostname }}:{{ matrix_bot_maubot_database_port }}/{{ matrix_bot_maubot_database_name }}?sslmode=disable'
|
||||||
|
|
||||||
matrix_bot_maubot_port: 29316
|
matrix_bot_maubot_port: 29316
|
||||||
matrix_bot_maubot_secret: 'generate'
|
matrix_bot_maubot_secret: 'generate'
|
||||||
|
@ -8,7 +8,6 @@ database: {{ matrix_bot_maubot_database_uri|to_json }}
|
|||||||
# Separate database URL for the crypto database. "default" means use the same database as above.
|
# Separate database URL for the crypto database. "default" means use the same database as above.
|
||||||
crypto_database:
|
crypto_database:
|
||||||
type: default
|
type: default
|
||||||
postgres_uri: {{ matrix_bot_maubot_database_uri|to_json }}
|
|
||||||
|
|
||||||
# Additional arguments for asyncpg.create_pool() or sqlite3.connect()
|
# Additional arguments for asyncpg.create_pool() or sqlite3.connect()
|
||||||
# https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool
|
# https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool
|
||||||
@ -28,24 +27,7 @@ plugin_directories:
|
|||||||
|
|
||||||
# Configuration for storing plugin databases
|
# Configuration for storing plugin databases
|
||||||
plugin_databases:
|
plugin_databases:
|
||||||
# The directory where SQLite plugin databases should be stored.
|
type: default
|
||||||
sqlite: /data/dbs
|
|
||||||
# The connection URL for plugin databases. If null, all plugins will get SQLite databases.
|
|
||||||
# If set, plugins using the new asyncpg interface will get a Postgres connection instead.
|
|
||||||
# Plugins using the legacy SQLAlchemy interface will always get a SQLite connection.
|
|
||||||
#
|
|
||||||
# To use the same connection pool as the default database, set to "default"
|
|
||||||
# (the default database above must be postgres to do this).
|
|
||||||
#
|
|
||||||
# When enabled, maubot will create separate Postgres schemas in the database for each plugin.
|
|
||||||
# To view schemas in psql, use `\dn`. To view enter and interact with a specific schema,
|
|
||||||
# use `SET search_path = name` (where `name` is the name found with `\dn`) and then use normal
|
|
||||||
# SQL queries/psql commands.
|
|
||||||
postgres:
|
|
||||||
# Maximum number of connections per plugin instance.
|
|
||||||
postgres_max_conns_per_plugin: 3
|
|
||||||
# Overrides for the default database_opts when using a non-"default" postgres connection string.
|
|
||||||
postgres_opts: {}
|
|
||||||
|
|
||||||
server:
|
server:
|
||||||
# The IP and port to listen to.
|
# The IP and port to listen to.
|
||||||
|
Loading…
Reference in New Issue
Block a user