mirror of
https://github.com/mautrix/telegram.git
synced 2026-05-17 07:25:46 +03:00
Change example database config to postgres
This commit is contained in:
@@ -7,9 +7,6 @@ function fixperms {
|
||||
|
||||
cd /opt/mautrix-telegram
|
||||
|
||||
# Replace database path in config.
|
||||
sed -i "s#sqlite:///mautrix-telegram.db#sqlite:////data/mautrix-telegram.db#" /data/config.yaml
|
||||
|
||||
if [ ! -f /data/config.yaml ]; then
|
||||
cp example-config.yaml /data/config.yaml
|
||||
echo "Didn't find a config file."
|
||||
|
||||
@@ -45,6 +45,10 @@ class Config(BaseBridgeConfig):
|
||||
def forbidden_defaults(self) -> List[ForbiddenDefault]:
|
||||
return [
|
||||
*super().forbidden_defaults,
|
||||
ForbiddenDefault(
|
||||
"appservice.database",
|
||||
"postgres://username:password@hostname/dbname",
|
||||
),
|
||||
ForbiddenDefault(
|
||||
"appservice.public.external",
|
||||
"https://example.com/public",
|
||||
|
||||
@@ -37,7 +37,7 @@ appservice:
|
||||
# Format examples:
|
||||
# SQLite: sqlite:///filename.db
|
||||
# Postgres: postgres://username:password@hostname/dbname
|
||||
database: sqlite:///mautrix-telegram.db
|
||||
database: postgres://username:password@hostname/dbname
|
||||
# Additional arguments for asyncpg.create_pool() or sqlite3.connect()
|
||||
# https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool
|
||||
# https://docs.python.org/3/library/sqlite3.html#sqlite3.connect
|
||||
|
||||
@@ -24,3 +24,6 @@ prometheus_client>=0.6,<0.13
|
||||
python-olm>=3,<4
|
||||
pycryptodome>=3,<4
|
||||
unpaddedbase64>=1,<3
|
||||
|
||||
#/sqlite
|
||||
aiosqlite>=0.16,<0.18
|
||||
|
||||
@@ -8,6 +8,5 @@ mautrix>=0.14.0rc4,<0.15
|
||||
# Fork to make session storage async
|
||||
tulir-telethon==1.25.0a1
|
||||
asyncpg>=0.20,<0.26
|
||||
aiosqlite>=0.17,<0.18
|
||||
mako>=1,<2
|
||||
setuptools
|
||||
|
||||
Reference in New Issue
Block a user