Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.11 KB

README.md

File metadata and controls

32 lines (21 loc) · 1.11 KB

Python aiogram

Scalable and straightforward template for bots written in aiogram.


Setting it up

System dependencies

  • Python 3.11
  • Poetry
  • Git

Preparations

  1. Clone this repo via:
    • HTTPS git clone https://github.com/corruptmane/aiogram_template.git
    • SSH git clone [email protected]:corruptmane/aiogram_template.git
  2. Move to the directory cd aiogram_template
  3. Rename dist.config.yml to config.yml (or docker_config.yml depends on would you deploy by docker or not) and replace variables to your own

Regular Deployment

  1. Install requirements: poetry install
  2. Run your bot: poetry run tgbot

Docker Deployment

  1. Deploy your infrastructure (Redis, PostgreSQL, etc.). Example infra.docker-compose.yml file is in deploy directory
  2. Build docker image: docker build -f deploy/Dockerfile -t template_bot:latest .
  3. Run command: docker-compose up -d