This telegram bot intends to promote information about cardiology.
Change telegram.is-dev-mode
in application.yaml
to true
.
To debug application in docker container just proceed with the following steps:
- Open port
5005
incompose.yaml
file. - Change JVM Remote Debug host to current ip address.
- Clone this repo to your local machine with the command:
git clone https://github.com/almax07082005/cardioTelegramBot.git
. - Add
.env
with the following variables:POSTGRES_USER
POSTGRES_PASSWORD
MAIN_TOKEN
LOGGER_TOKEN
GUIDE
DOCKER_TAG
- Start your application with
restartDockerImage
gradle custom task.
- Setup VM
- Install Docker (https://docs.docker.com/engine/install/ubuntu/)
- Login to Docker Hub
- Create directory with the name given in CD.yml
- Copy there compose.yaml
- Change image name in compose.yaml file
- Update GitHub secrets and variables
docker run --rm -v <your_volume_name>:/volume -v $(pwd):/backup busybox tar czvf /backup/backup.tar.gz -C /volume .
scp backup.tar.gz user@<destination_vm>:</path/to/destination>
docker volume create <new_volume_name>
docker run --rm -v <new_volume_name>:/volume -v </path/to/destination>:/backup busybox tar xzvf /backup/backup.tar.gz -C /volume
- Add name of the button to
Buttons
enum. - Create private method with
Runnable
structure inButton
class. - Put new element in HashMap for
BotService
to be able to call this method. - Do not forget to create this button on the front side, if you need.
- Add name of the button to
Commands
enum. - Create private method with
Runnable
structure inCommand
class. - Put new element in HashMap for
BotService
to be able to call this method. - Do not forget to add this command through BotFather, if you need.