Go to file
Francesco Esposito 8ac79a06a8 Edit readme 2022-01-31 16:42:21 +01:00
src Update && add Dockerfile 2022-01-31 16:19:33 +01:00
.env.sample Update && add Dockerfile 2022-01-31 16:19:33 +01:00
.gitignore Initial version 2020-06-21 17:24:53 +02:00
Dockerfile Update && add Dockerfile 2022-01-31 16:19:33 +01:00
LICENSE Initial commit 2020-06-18 16:10:14 +02:00
README.md Edit readme 2022-01-31 16:42:21 +01:00
docker-compose.yml Update && add Dockerfile 2022-01-31 16:19:33 +01:00
package-lock.json Update && add Dockerfile 2022-01-31 16:19:33 +01:00
package.json Update && add Dockerfile 2022-01-31 16:19:33 +01:00
test-publish.js Edit readme 2022-01-31 16:42:21 +01:00

README.md

NotificamBot

Telegram bot to receive notifications reads from a queue (pub/sub on Redis).

Configuration

Rename .env.sample in .env and configure it:

KEY DESCRIPTION
BOT_TOKEN Telegram Bot Token created with @BotFather
CHAT_ID Your chat id with the bot (you can configure this after the first launch of the bot from client)
REDIS_CHANELL Channel where the bot reads
REDIS_HOST Host redis (don't touch if you use docker-compose).
REDIS_PASSWORD Redis password

Usage

  1. Clone the project with
git clone https://github.com/franjsco/NotificamBot.git
  1. Build docker image and run it with docker-compose:
docker-compose up --build
  1. Search your bot on telegram and start it. The chat id will be displayed on the terminal Copy it into .env and stop (CTRL+C) and start containers.
docker-compose up
  1. Now you can perform a test.
node test-publish.js
  1. You can send notifications to the bot by connecting to the container redis instance from any application and post messages to the configured queue.