https://github.com/alukianov63/telegram-bot-template
A simple telegram bot template written on the aiogram~3.0.0, using PostgreSQL and Redis databases
https://github.com/alukianov63/telegram-bot-template
aiogram3 bot docker docker-compose postgresql python redis template
Last synced: 3 months ago
JSON representation
A simple telegram bot template written on the aiogram~3.0.0, using PostgreSQL and Redis databases
- Host: GitHub
- URL: https://github.com/alukianov63/telegram-bot-template
- Owner: aLukianov63
- License: mit
- Created: 2023-09-01T12:29:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-28T17:02:56.000Z (almost 3 years ago)
- Last Synced: 2025-06-04T05:08:53.095Z (about 1 year ago)
- Topics: aiogram3, bot, docker, docker-compose, postgresql, python, redis, template
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Telegram bot template✨
[](https://pypi.org/project/aiogram/)
[](https://www.python.org/)
A simple telegram bot template written on the aiogram~3.0.0, using PostgreSQL and Redis databases
## 🐋 Getting start with docker
```
git clone https://github.com/aLukianov63/telegram-bot-template.git
```
Configure environment variables in ``.env`` file, see [here](#configuration)
```
docker-compose build
docker-compose up -d
```
## 💵 Payments
In order for your bot to charge users, you need to specify a [payment
token](https://core.telegram.org/bots/payments#:~:text=Getting%20a%20Token,-Use%20the%20%2Fmybots&text=Go%20to%20Bot%20Settings%20%3E%20Payments,will%20now%20show%20available%20providers.)
in the ``.env`` file
## ⚙️ Configuration
| variables | description |
|:-----------------:|-----------------------------------------------|
| `API_TOKEN` | telegram bot api token |
| `PG_HOST` | hostname or an IP address PostgreSQL database |
| `PG_PORT` | connection port number |
| `PG_PASSWORD` | password used to authenticate |
| `PG_USER` | the username used to authenticate |
| `PG_NAME` | the name of the PostgreSQL database |
| `RD_HOST` | hostname or an IP address Redis database |
| `RD_PORT` | port from Redis database |
| `RD_DB` | redis database number |
| `PAY_TOKEN` | your payment provider's token |
| `PRODUCT_1_PRICE` | product 1 price |
| `PRODUCT_2_PRICE` | product 2 price |
## 📝 License
Distributed under the MIT license. See `LICENSE` for more information.