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.
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"
docker-compose up
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
Content type
Image
Digest
Size
37.5 MB
Last updated
almost 5 years ago
docker pull ripreal/simple-reg-bot