Telegram bot based on a template from wakaree with using dishka and aiogram_dialog
- Python 3.12+
- Docker
- docker-compose
- make
- poetry
Via Docker
- Rename
.env.distto.envand configure it - Rename
docker-compose.example.ymltodocker-compose.yml - Run
make app-buildcommand thenmake app-runto start the bot
- Configure and start PostgreSQL
- Configure and start Redis (» Read more)
- Rename
.env.exampleto.envand configure it - Run database migrations with
make migratecommand - Configure
telegram-bot.service(» Read more)
poetry install
Make migration script:
make migration message=MESSAGE_WHAT_THE_MIGRATION_DOES
Run migrations:
make migrate
- Aiogram 3.x (Telegram bot framework)
- PostgreSQL (database)
- SQLAlchemy (working with database from Python)
- Alembic (lightweight database migration tool)
- Redis (in-memory data storage for FSM and caching)
- Dishka (DI framework with scopes and agreeable API)
- aiogram_dialog (framework for developing interactive messages and menus in your telegram bot like a normal GUI application.)