A bot for transfering messages from one messenger to another.
Supported attachment types: photos, wall posts, files up to 50 MB
Supported messengers: VK, Telegram
/get_token
command/subscribe <token>
command in receiving chat/unsubscribe <token>
In order for bot to run, you need to specify some environmental variables:
TG_TOKEN
- Telegram bot tokenVK_TOKEN
- VK bot tokenDB_USERNAME
- database usernameDB_PASSWORD
- database passwordCONTROLLER_PORT
- controller service portVK_SERVICE_PORT
- VK service portTG_SERVICE_PORT
- TG service portYou can also define MIGRATE_DB
environmental variable in order to run database migrations before starting bot
Environmental variables can be either defined in current shell session or stored in .env
file in project root.
The rest is handled by Docker Compose, thus your running command may look like this:
MIGRATE_DB=1 docker-compose up -d
In order to shut the bot down you will need to run docker-compose down
.
Docker Compose script runs local instance of PostgreSQL server. One can use Postgres server of his choice instead of one run in local container. In order to achieve that, one will need to build & run bot with following environmental variables:
VK_TOKEN
TG_TOKEN
DB_CONNECT_STRING
- database connection string specifically for selected databaseMigrations are managed by Goose, thus one should make use of it to set up database.
For debugging controller service, the following command may be used:
docker-compose -f docker-compose.yml -f docker-compose.debug.yml -p transferbot-debug up -d --build
Debugger will be available at port 40000 and can be accessed with some interface (e.g. through Goland's remote debugger).