Compare commits
10 Commits
5.0.2+v1.9
...
5.0.6+v1.1
Author | SHA1 | Date | |
---|---|---|---|
bfe62d023c | |||
81d2827bc9 | |||
6fe14edef7 | |||
a0a9c2b863 | |||
bdf8e11dc5 | |||
2658fed366 | |||
72b59ce4ad | |||
dfed1e54da | |||
d4ccb3588b | |||
11f70b7878 |
13
.env.sample
13
.env.sample
@ -73,6 +73,13 @@ RETENTION_MAX_LIFETIME=4w
|
||||
#MEDIA_RETENTION_LOCAL_LIFETIME=30d
|
||||
#MEDIA_RETENTION_REMOTE_LIFETIME=14d
|
||||
|
||||
## Ratelimit
|
||||
|
||||
#LOGIN_LIMIT_IP_PER_SECOND=5
|
||||
#LOGIN_LIMIT_IP_BURST=15
|
||||
#LOGIN_LIMIT_ACCOUNT_PER_SECOND=1
|
||||
#LOGIN_LIMIT_ACCOUNT_BURST=10
|
||||
|
||||
## Keycloak SSO
|
||||
|
||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.keycloak.yml"
|
||||
@ -125,12 +132,12 @@ RETENTION_MAX_LIFETIME=4w
|
||||
#APP_SERVICE_BOT_USERNAME=telegrambot
|
||||
#APP_SERVICE_DISPLAY_NAME="Telegram bridge bot"
|
||||
#APP_SERVICE_ID=
|
||||
#HOMESERVER_DOMAIN=
|
||||
#HOMESERVER_URL=
|
||||
#HOMESERVER_DOMAIN=$DOMAIN
|
||||
#HOMESERVER_URL=https://$DOMAIN
|
||||
#VERIFY_SSL=false
|
||||
#ENABLE_ENCRYPTION=true
|
||||
#TELEGRAM_APP_ID=
|
||||
#TELEGRAM_BRIDGE_PERMISSIONS="{ \"*\": \"relaybot\" }"
|
||||
#TELEGRAM_BRIDGE_PERMISSIONS="{ \"*\": \"relaybot\", \"@foo:matrix.example.com\": \"admin\" }"
|
||||
#TELEGRAM_SYNC_CHANNEL_MEMBERS=true
|
||||
#SECRET_TELEGRAM_DB_PASSWORD_VERSION=v1
|
||||
#SECRET_TELEGRAM_API_HASH_VERSION=v1
|
||||
|
@ -47,7 +47,7 @@ You'll need to deploy something like [this](https://git.autonomic.zone/ruangrupa
|
||||
|
||||
Setting it up is a bit of a chicken/egg & chasing cats moment.
|
||||
|
||||
You need to get your bot setup on the telegram side first and have these values:
|
||||
You need to get your bot setup on the telegram side first by creating a [telegram app](https://my.telegram.org/apps) and a [telegram bot](https://docs.mau.fi/bridges/python/telegram/relay-bot.html#setup) and have these values:
|
||||
|
||||
```
|
||||
api_id: ...
|
||||
@ -55,7 +55,12 @@ api_hash: ...
|
||||
telegram_bot_token: ...
|
||||
```
|
||||
|
||||
Here is a rough guide:
|
||||
Also:
|
||||
- Make sure to uncomment `APP_SERVICES_ENABLED`
|
||||
- include the registration in synapse: `APP_SERVICE_CONFIGS="[\"/telegram-data/registration.yaml\"]"`
|
||||
- and set yourself as admin under `TELEGRAM_BRIDGE_PERMISSIONS`
|
||||
|
||||
A rough guide for the following steps:
|
||||
|
||||
```
|
||||
abra app secret insert <domain> telegram_api_hash v1 <secret>
|
||||
|
4
abra.sh
4
abra.sh
@ -1,6 +1,6 @@
|
||||
export DISCORD_BRIDGE_YAML_VERSION=v2
|
||||
export ENTRYPOINT_CONF_VERSION=v1
|
||||
export HOMESERVER_YAML_VERSION=v26
|
||||
export ENTRYPOINT_CONF_VERSION=v2
|
||||
export HOMESERVER_YAML_VERSION=v27
|
||||
export LOG_CONFIG_VERSION=v2
|
||||
export SHARED_SECRET_AUTH_VERSION=v1
|
||||
export SIGNAL_BRIDGE_YAML_VERSION=v4
|
||||
|
@ -10,7 +10,7 @@ services:
|
||||
- telegram-data:/telegram-data
|
||||
|
||||
telegrambridge:
|
||||
image: dock.mau.dev/mautrix/telegram:v0.14.2
|
||||
image: dock.mau.dev/mautrix/telegram:v0.15.1
|
||||
depends_on:
|
||||
- telegramdb
|
||||
configs:
|
||||
|
16
compose.yml
16
compose.yml
@ -3,7 +3,7 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: nginx:1.23.3
|
||||
image: nginx:1.25.3
|
||||
networks:
|
||||
- proxy
|
||||
- internal
|
||||
@ -27,7 +27,7 @@ services:
|
||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
|
||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
- "coop-cloud.${STACK_NAME}.version=5.0.2+v1.93.0"
|
||||
- "coop-cloud.${STACK_NAME}.version=5.0.6+v1.100.0"
|
||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
||||
healthcheck:
|
||||
test: curl -f http://synapse:8008/health || exit 1
|
||||
@ -36,7 +36,7 @@ services:
|
||||
retries: 20
|
||||
|
||||
synapse:
|
||||
image: "matrixdotorg/synapse:v1.93.0"
|
||||
image: "matrixdotorg/synapse:v1.100.0"
|
||||
volumes:
|
||||
- "data:/data"
|
||||
secrets:
|
||||
@ -72,6 +72,10 @@ services:
|
||||
- USER_IPS_MAX_AGE
|
||||
- VIRTUAL_HOST=${DOMAIN}
|
||||
- VIRTUAL_PORT=8008
|
||||
- LOGIN_LIMIT_IP_PER_SECOND=${LOGIN_LIMIT_IP_PER_SECOND:-0.003}
|
||||
- LOGIN_LIMIT_IP_BURST=${LOGIN_LIMIT_IP_BURST:-5}
|
||||
- LOGIN_LIMIT_ACCOUNT_PER_SECOND=${LOGIN_LIMIT_ACCOUNT_PER_SECOND:-0.003}
|
||||
- LOGIN_LIMIT_ACCOUNT_BURST=${LOGIN_LIMIT_ACCOUNT_BURST:-5}
|
||||
networks:
|
||||
- internal
|
||||
entrypoint: /docker-entrypoint.sh
|
||||
@ -115,9 +119,9 @@ services:
|
||||
deploy:
|
||||
labels:
|
||||
backupbot.backup: "true"
|
||||
backupbot.backup.pre-hook: "mkdir -p /tmp/backup/ && PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /tmp/backup/backup.sql"
|
||||
backupbot.backup.post-hook: "rm -rf /tmp/backup"
|
||||
backupbot.backup.path: "/tmp/backup/"
|
||||
backupbot.backup.pre-hook: "PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /var/lib/postgresql/data/backup.sql"
|
||||
backupbot.backup.post-hook: "rm -r /var/lib/postgresql/data/backup.sql"
|
||||
backupbot.backup.path: "/var/lib/postgresql/data"
|
||||
|
||||
volumes:
|
||||
data:
|
||||
|
@ -6,6 +6,7 @@ chown 991:991 /data
|
||||
|
||||
if [[ ! -f /data/{{ env "DOMAIN" }}.signing.key ]]; then
|
||||
/start.py generate
|
||||
chown -R 991:991 /data/*.config /data/*.key
|
||||
fi
|
||||
|
||||
/start.py
|
||||
|
@ -267,3 +267,12 @@ forget_rooms_on_leave: true
|
||||
# https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#opentracing-1
|
||||
opentracing:
|
||||
enabled: false
|
||||
|
||||
# https://matrix-org.github.io/synapse/develop/usage/configuration/config_documentation.html#ratelimiting
|
||||
rc_login:
|
||||
address:
|
||||
per_second: {{ env "LOGIN_LIMIT_IP_PER_SECOND" }}
|
||||
burst_count: {{ env "LOGIN_LIMIT_IP_BURST" }}
|
||||
account:
|
||||
per_second: {{ env "LOGIN_LIMIT_ACCOUNT_PER_SECOND" }}
|
||||
burst_count: {{ env "LOGIN_LIMIT_ACCOUNT_BURST" }}
|
||||
|
Reference in New Issue
Block a user