Pelmenner / TransferBot

Tool for continuous message transfer between chats and messengers using bots
1 stars 2 forks source link
bot golang telegram vk

TransferBot

Description

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

demo_image

Links

How to use

Running using Docker Compose

In order for bot to run, you need to specify some environmental variables:

You 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.

Running without local database

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:

Migrations are managed by Goose, thus one should make use of it to set up database.

DEBUG

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).