build: publish reproducible patched image

This commit is contained in:
Eddy de Vink 2026-08-18 10:04:02 +02:00
commit 6dc5a9428b
4 changed files with 65 additions and 37 deletions

View file

@ -9,9 +9,49 @@ The project is a work in progress: star it, create issues, features or pull requ
**NOTE**: I can't guarantee you will not be blocked by using this method, although it has worked for me. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldn't be considered totally safe.
## Patched public distribution
This Forgejo fork bundles a patched `whatsapp-web.js` release that tolerates
WhatsApp Web message IDs exposed as `$1` instead of `_serialized`.
- Source repository: [eddy/wwebjs-api](https://git.eddydevink.nl/eddy/wwebjs-api)
- Patched library: [eddy/whatsapp-web.js](https://git.eddydevink.nl/eddy/whatsapp-web.js)
- Public image: `git.eddydevink.nl/eddy/wwebjs-api:1.34.7-serialized-id-2dd7653`
The image is built from the Dockerfile in this repository and pins the patched
library archive through `package-lock.json`. It is not an official WhatsApp or
whatsapp-web.js release.
## Quick Start with the patched image
```bash
git clone https://git.eddydevink.nl/eddy/wwebjs-api.git
cd wwebjs-api
cp .env.example .env
# Set BASE_WEBHOOK_URL and a strong API_KEY in .env.
docker compose pull
docker compose up -d
```
The default Compose file uses the public patched image. The API listens on
`PORT` (3000 by default). Start a session and scan its QR code with:
```bash
curl http://localhost:3000/session/start/ABCD
```
For a completely local, reproducible build instead of pulling the image:
```bash
docker compose -f docker-compose.build.yml up -d --build
```
The build uses the committed `vendor/whatsapp-web.js-1.34.7.tgz` archive and
does not download an unpatched upstream `main` branch.
## Table of Contents
[1. Quick Start with Docker](#quick-start-with-docker)
[1. Quick Start with the patched image](#quick-start-with-the-patched-image)
[2. Features](#features)
@ -29,31 +69,6 @@ The project is a work in progress: star it, create issues, features or pull requ
[9. Star History](#star-history)
## Quick Start with Docker
[![dockeri.co](https://dockerico.blankenship.io/image/avoylenko/wwebjs-api)](https://hub.docker.com/r/avoylenko/wwebjs-api)
1. Clone the repository:
```bash
git clone https://github.com/avoylenko/wwebjs-api.git
cd wwebjs-api
```
3. Run the Docker Compose:
```bash
docker compose pull && docker compose up
```
4. Visit http://localhost:3000/session/start/ABCD
5. Scan the QR on your console using WhatsApp mobile app -> Linked Device -> Link a Device (it may take time to setup the session)
6. Visit http://localhost:3000/client/getContacts/ABCD
7. EXTRA: Look at all the callbacks data in `./session/message_log.txt`
![Quick Start](./assets/basic_start.gif)
## Features