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
.
Clone the repository:
git clone https://github.com/lissizza/armenia-outages.git
cd armenia-outages
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
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.
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.
/start
command./subscription_list
command will list all the user's current subscriptions and allows to unsubscribe.Contributions are welcome! Please feel free to submit a pull request or open an issue on GitHub.
This project is licensed under the MIT License. See the LICENSE file for details.