diff --git a/build/docker/config/dendrite-config.yaml b/build/docker/config/dendrite-config.yaml index 0c264d83c..d6357747b 100644 --- a/build/docker/config/dendrite-config.yaml +++ b/build/docker/config/dendrite-config.yaml @@ -174,6 +174,11 @@ federation_api: connect: http://federation_api:7772 external_api: listen: http://0.0.0.0:8072 + database: + connection_string: postgresql://dendrite:itsasecret@postgres/dendrite_federationapi?sslmode=disable + max_open_conns: 10 + max_idle_conns: 2 + conn_max_lifetime: -1 # List of paths to X.509 certificates to be used by the external federation listeners. # These certificates will be used to calculate the TLS fingerprints and other servers diff --git a/build/docker/postgres/create_db.sh b/build/docker/postgres/create_db.sh index 880e97cc5..a7107e272 100755 --- a/build/docker/postgres/create_db.sh +++ b/build/docker/postgres/create_db.sh @@ -1,5 +1,5 @@ #!/bin/sh -for db in userapi_accounts userapi_devices mediaapi syncapi roomserver signingkeyserver keyserver federationapi appservice naffka; do +for db in userapi_accounts userapi_devices mediaapi syncapi roomserver keyserver federationapi appservice naffka; do createdb -U dendrite -O dendrite dendrite_$db done diff --git a/dendrite-config.yaml b/dendrite-config.yaml index 04a98c664..1204bd546 100644 --- a/dendrite-config.yaml +++ b/dendrite-config.yaml @@ -191,6 +191,11 @@ federation_api: connect: http://localhost:7772 external_api: listen: http://[::]:8072 + database: + connection_string: file:federationapi.db + max_open_conns: 10 + max_idle_conns: 2 + conn_max_lifetime: -1 # List of paths to X.509 certificates to be used by the external federation listeners. # These certificates will be used to calculate the TLS fingerprints and other servers