Skip to content

Example of set up server environment using Docker#

Python Webhook Server library for integration with WhatsApp messenger via API of green-api.com service.

To run this project with Docker, you will need:

Docker must be installed on the machine.

To get an image from DockerHub, use the command:

sudo docker pull greenapi/whatsapp-api-webhook-server-python-v2

Run the image in a container with the port and the console displayed:

sudo docker run -it -e PORT=8000 -p 80:8000 greenapi/whatsapp-api-webhook-server-python-v2

In this case we run a webhook server on 8000 port inside container and proxy our machine's 80 port to internal 8000 container's port

In console you will need to specify the IP (or external machine name) with this (80) port.

After the container is launched, the data on incoming webhooks will be available in the console.

Also you can run it via docker compose (from root repo directory):

docker compose up --build