Scalable and straightforward template for bots written in aiogram.
- Python 3.11
- Poetry
- Git
- Clone this repo via:
- HTTPS
git clone https://github.com/corruptmane/aiogram_template.git - SSH
git clone git@github.com:corruptmane/aiogram_template.git
- HTTPS
- Move to the directory
cd aiogram_template - Rename
dist.config.ymltoconfig.yml(ordocker_config.ymldepends on would you deploy by docker or not) and replace variables to your own
- Install requirements:
poetry install - Run your bot:
poetry run tgbot
- Deploy your infrastructure (Redis, PostgreSQL, etc.). Example
infra.docker-compose.ymlfile is indeploydirectory - Build docker image:
docker build -f deploy/Dockerfile -t template_bot:latest . - Run command:
docker-compose up -d