JavaRush Telegram bot from community
The bot is deployed using Docker, which ensures convenience, portability, and dependency isolation. The deployment process is designed to facilitate smooth integration and continuous delivery.
Before deploying, ensure that you have the following installed on your machine:
- Docker
- Docker Compose (for orchestrating multiple containers)
The bot requires the following environment variables to operate:
- BOT_NAME — the name of the Telegram bot as registered with BotFather.
- BOT_TOKEN — the token for accessing the Telegram bot's HTTP API.
These variables should be specified in an .env file located in the same directory as your docker-compose.yml.
Here's an example of what the .env file should contain:
- BOT_NAME=your_bot_name_here
- BOT_TOKEN=your_bot_token_here
Warning: Never commit the .env file to public repositories or distribute it by any other means as it contains sensitive data.
To run the bot, execute the following command in the project directory:
docker-compose up
To stop the bot, you can use the following command in the project directory:
docker-compose down