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
5005incompose.yamlfile. - 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
.envwith the following variables:POSTGRES_USERPOSTGRES_PASSWORDMAIN_TOKENLOGGER_TOKENGUIDEDOCKER_TAG
- Start your application with
restartDockerImagegradle 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
Buttonsenum. - Create private method with
Runnablestructure inButtonclass. - Put new element in HashMap for
BotServiceto 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
Commandsenum. - Create private method with
Runnablestructure inCommandclass. - Put new element in HashMap for
BotServiceto be able to call this method. - Do not forget to add this command through BotFather, if you need.