Skip to content

🤖 Template for telegram-bot using PostgreSQL (asyncpg) with SQLAlchemy + alembic and Fluent.

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
COPYING
Notifications You must be signed in to change notification settings

Th3Kanashii/aiogram3-bot-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aiogram3-bot-template

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.

System dependencies

  • Python 3.8+
  • Docker
  • docker-compose
  • make
  • hatch

Deployment

Via Docker

  • Rename .env.dist to .env and configure it
  • Configure docker-compose.yml
  • Run make app-build command then make app-run to start the bot

Via Systemd service

  • 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)

Development

Setup environment

make dev

Update database tables structure

Make migration script:

make migration name=NAME_MIGRATION --rev-id=ID_MIGRATION

Run migrations:

make migrate

Used technologies

About

🤖 Template for telegram-bot using PostgreSQL (asyncpg) with SQLAlchemy + alembic and Fluent.

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
COPYING

Stars

Watchers

Forks