Sign inSign up

ripreal/simple-reg-bot

By ripreal

Updated almost 5 years ago

Whatsapp API docker example

Image
0

230

ripreal/simple-reg-bot repository overview

Simple reg bot

A sample chat bot in container that collects basic info (name, birth year etc) about user from WhatsApp. The WhatsApp integration is based on whatsapp-bot-library and features V0 protocol. You need to get phone charged and connected to network, you also need a phone number.

How to run

1 Register on green-api.com (it's free), get own ID_INSTANCE and API_TOKEN_INSTANCE and inside folder credentials put file also called credentials with the next content:

ID_INSTANCE=00000
API_TOKEN_INSTANCE=0000000000000000000000000000000000000

2 Create docker-compose.yml file:

version: "3.7"

networks:
  green-api-bots:
    driver: bridge                       
    driver_opts:                         
      com.docker.network.driver.mtu: 1500

services:

  simple-reg-bot:
    hostname: simple-reg-bot
    restart: unless-stopped
    image: ripreal/simple-reg-bot:latest
    volumes:
       - ./credentials:/usr/src/app/credentials
    networks:
      - "green-api-bots"
  1. Run the container using docker-compose.yml
docker-compose up

For developers

You can change source code and compile own container with the next commands

docker build . -t ripreal/simple-reg-bot --no-cache
docker run  --name ripreal/simple-reg-bot:1.0.1

Third-party libraries

Tag summary

Content type

Image

Digest

Size

37.5 MB

Last updated

almost 5 years ago

docker pull ripreal/simple-reg-bot