Deploying a server in a Docker container#
C++ Webhook server Library for integration with WhatsApp messenger via API of green-api.com service.
To run this project with Docker, you will need:
- The built C++ WhatsApp Webhook Server project on Windows or Linux
- Installed Docker Desktop for Windows or Docker Desktop for Linux.
Clone the repository:
git clone --branch=master --depth=1 https://github.com/green-api/whatsapp-api-webhook-server-cpp
cd whatsapp-api-webhook-server-cpp
source/user_adapter.cpp
If you don't have required file, create it by renaming with removing underscore from source/_user_adapter.cpp file.
We will update include/user_adapter.h
and source/_user_adapter.cpp
files as new webhooks are released. If you encountered build error, which tells compiler could not find required functions from user_adapter
, please add new functions from source/_user_adapter.cpp
to yours source/user_adapter.cpp
By default, port 5000
is exposed. If you would like to change it, you need:
-
Change
Address
field inconfig.json
to your desired port; -
Change
ports
field incompose.yaml
to your desired port;
Run Docker image with Docker Compose:
docker compose up --build whatsapp-api-webhook-server-cpp
Server will be started after building automatically. Detailed configuration description available here.
To test the server you can use Postman collection.