This template uses code from a repository that is licensed under the MIT License. I am grateful to the wakaree for creating and publishing this code.
The original license of the borrowed code can be found in the COPYING file.
- Python 3.8+
- Docker
- docker-compose
- make
- hatch
Via Docker
- Rename
.env.dist
to.env
and configure it - Configure
docker-compose.yml
- Run
make app-build
command thenmake app-run
to start the bot
- Configure and start PostgreSQL
- Rename
.env.dist
to.env
and configure it - Configure url in
alembic.ini
- Run database migrations with
make migrate
command - Configure
systemd/telegram-bot.service
(» Read more)
make dev
Make migration script:
make migration name=NAME_MIGRATION --rev-id=ID_MIGRATION
Run migrations:
make migrate
- Aiogram 3.x (Telegram bot framework)
- PostgreSQL (database)
- SQLAlchemy (working with database from Python)
- Alembic (lightweight database migration tool)
- Project Fluent (modern localization system)