lissizza / armenia_outages

MIT License
0 stars 0 forks source link

Armenia Outages Watcher

Armenia Outages Watcher is a Telegram bot designed to monitor and notify users about power, water, and gas outages in Armenia. The bot supports multiple languages (Armenian, Russian, and English) and allows users to subscribe to outage notifications for specific areas. The project is built using Python based on python-telegram-bot.

Features

Installation

Prerequisites

Setup

  1. Clone the repository:

    git clone https://github.com/lissizza/armenia-outages.git
    cd armenia-outages
  2. Configure the environment variables:

    Create a .env file in the root directory of the project and add the following variables:

    TELEGRAM_BOT_TOKEN=your_telegram_bot_token
    OPENAI_AI_KEY=your_openai_key
    POSTGRES_USER=your_postgres_username
    POSTGRES_PASSWORD=your_postgres_password
    DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/armenia_outages
    POSTGRES_PORT=5432
  3. Build and run the containers:

    In the root directory of the project, run:

    docker-compose up --build -d

    This command will build the necessary Docker images and start the containers in detached mode. The environment variables will be automatically loaded from the .env file.

  4. Initialize the database:

    If the database has not been initialized, you can run the following command inside the running container:

    docker-compose exec bot python3 -m db init_db

    This will create the necessary database tables.

Usage

Future Plans

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue on GitHub.

License

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