Telegram bridge for Matrix #33
12
mautrix-telegram/.env.dist
Normal file
12
mautrix-telegram/.env.dist
Normal file
|
@ -0,0 +1,12 @@
|
|||
# see https://mau.dev/mautrix/telegram/
|
||||
IMAGE_VERSION=latest
|
||||
|
||||
HOST_USER=1337
|
||||
HOST_GROUP=1337
|
||||
|
||||
# Do not modify unless you know what you're doing!
|
||||
# It is used by 'synapse' stack.
|
||||
#HOST_DATA_DIR=./data
|
||||
|
||||
LOG_MAX_SIZE=5m
|
||||
LOG_MAX_FILE=5
|
16
mautrix-telegram/README.md
Normal file
16
mautrix-telegram/README.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Telegram Bridge for Matrix
|
||||
|
||||
## Create internal network for Matrix services
|
||||
|
||||
You should've created this network while setting up [synapse](../synapse/README.md). But if you didn't, then do it
|
||||
before trying to run this stack:
|
||||
|
||||
```shell
|
||||
docker network create --internal matrix
|
||||
```
|
||||
|
||||
## Bridge setup documentation
|
||||
|
||||
- https://docs.mau.fi/bridges/python/setup/docker.html?bridge=telegram
|
||||
- https://docs.mau.fi/bridges/general/registering-appservices.html
|
||||
- https://docs.mau.fi/bridges/python/telegram/relay-bot.html (optional)
|
2
mautrix-telegram/data/.gitignore
vendored
Normal file
2
mautrix-telegram/data/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/*
|
||||
!/.gitignore
|
30
mautrix-telegram/docker-compose.yml
Normal file
30
mautrix-telegram/docker-compose.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
# https://mau.dev/mautrix/telegram/
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
mautrix-telegram:
|
||||
image: "dock.mau.dev/mautrix/telegram:${IMAGE_VERSION:-latest}"
|
||||
container_name: mautrix-telegram
|
||||
volumes:
|
||||
# This volume is also used by 'synapse' stack.
|
||||
# Do not change the path unless you know what you're doing.
|
||||
- "${HOST_DATA_DIR:-./data}:/data"
|
||||
env_file: .env
|
||||
environment:
|
||||
UID: "${HOST_USER:-1337}"
|
||||
GID: "${HOST_GROUP:-1337}"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- default
|
||||
- matrix
|
||||
restart: unless-stopped
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "${LOG_MAX_SIZE:-5m}"
|
||||
max-file: "${LOG_MAX_FILE:-5}"
|
||||
|
||||
networks:
|
||||
matrix:
|
||||
external: true
|
|
@ -1,6 +1,12 @@
|
|||
# [Synapse](https://matrix.org/docs/projects/server/synapse) ([Matrix.org](https://matrix.org/) server)
|
||||
|
||||
# Generating server configuration
|
||||
## Create internal network for Matrix services
|
||||
|
||||
```shell
|
||||
docker network create --internal matrix
|
||||
```
|
||||
|
||||
## Generate server configuration
|
||||
|
||||
Do not forget to prepare `.env` file before running this.
|
||||
|
||||
|
@ -15,7 +21,7 @@ If you want to use full-fledged PostgreSQL instead of SQLite, you can check
|
|||
|
||||
To use PostgreSQL running on the host machine, use [this](../_docs/access_database_on_host_from_docker.md) configuration.
|
||||
|
||||
# Running the server
|
||||
## Run the server
|
||||
|
||||
```shell
|
||||
docker-compose up -d
|
||||
|
|
|
@ -15,10 +15,20 @@ services:
|
|||
- "${DATA_PATH:-./data}:/data"
|
||||
# SSL certs directory
|
||||
- "${SSL_PATH:-./ssl}:/ssl:ro"
|
||||
# Bridges
|
||||
# Telegram
|
||||
- "../mautrix-telegram/data:/bridges/mautrix-telegram/data:ro"
|
||||
env_file: .env
|
||||
networks:
|
||||
- default
|
||||
- matrix
|
||||
restart: unless-stopped
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "${LOG_MAX_SIZE:-5m}"
|
||||
max-file: "${LOG_MAX_FILE:-5}"
|
||||
|
||||
networks:
|
||||
matrix:
|
||||
external: true
|
||||
|
|
Loading…
Reference in a new issue