Skip to content

✨ Jessy: Your go-to template for Telegram bots with Aiogram! πŸ€– Get up and running fast with Docker, PostgreSQL, and Alembic for database migrations. Perfect for bootstrapping your next project! πŸš€πŸ˜„

License

Notifications You must be signed in to change notification settings

right-git/jessy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Jessy

A template repository for creating a Telegram bot using Aiogram. This template includes essential setup for Docker, PostgreSQL, and Alembic for database migrations, making it easy to bootstrap your next project.


Features

  • Aiogram Framework: A modern and efficient framework for Telegram bots.
  • Database Integration: Pre-configured with PostgreSQL.
  • Database Migrations: Integrated with Alembic for schema migrations.
  • Dockerized Setup: Docker Compose configuration for easy deployment.
  • Environment Variables: Centralized configuration using a .env file.

Project Structure

β”œβ”€β”€ app/                  # Main application folder
β”‚   β”œβ”€β”€ runme.py          # Entry point to start the bot
β”‚   β”œβ”€β”€ bot.py            # Core bot logic
β”œβ”€β”€ migrations/           # Alembic migrations folder
β”œβ”€β”€ .env                  # Environment configuration file
β”œβ”€β”€ alembic.ini           # Alembic configuration file
β”œβ”€β”€ requirements.txt      # Python dependencies
β”œβ”€β”€ Dockerfile            # Docker configuration for the bot
β”œβ”€β”€ docker-compose.yml    # Docker Compose setup
└── README.md             # Project documentation

Getting Started

Prerequisites

  • Python 3.10+
  • Docker & Docker Compose
  • PostgreSQL (if running locally without Docker)

Setup

1. Clone the Repository

git clone https://github.com/iismoilov7/jessy.git
cd jessy

2. Create a .env File

Create a .env file in the project root, you can use .env-example for instacne

3. Build and Start the Project

Using Docker Compose:

docker-compose up --build

This will:

  • Build the bot service.
  • Spin up a PostgreSQL database.
  • Run the Telegram bot.

Usage

  • Starting the Bot: The bot starts automatically when the bot container is running.

  • Accessing Logs: To view logs:

    docker-compose logs -f bot
  • Stopping the Services:

    docker-compose down

Development

Install Dependencies

If you prefer running the bot locally:

  1. Set up postgresql database and set .env files
  2. Install dependencies:
    pip install -r requirements.txt
  3. Apply migrations:
    alembic upgrade head
  4. Start the bot:
    python app/runme.py

Deployment

This template is designed for easy deployment via Docker. You can use platforms like Heroku, AWS, or DigitalOcean to host your bot.


Contributing

  1. Fork the repository.
  2. Create a feature branch:
    git checkout -b feature/your-feature-name
  3. Commit your changes:
    git commit -m "Add your commit message"
  4. Push to the branch:
    git push origin feature/your-feature-name
  5. Create a Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Acknowledgments


Support

For issues or questions, please open an issue.

Stars

About

✨ Jessy: Your go-to template for Telegram bots with Aiogram! πŸ€– Get up and running fast with Docker, PostgreSQL, and Alembic for database migrations. Perfect for bootstrapping your next project! πŸš€πŸ˜„

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published