fix(docker): pass WWEBJS_WEB_VERSION through to the container (#273)
Fixes #273 (recurrence of #251).
Problem
Sessions hang at "authenticating" after the QR is scanned when whatsapp-web.js 1.34.x auto-selects an incompatible WA-Web version. The documented workaround is to pin WWEBJS_WEB_VERSION (see docs/12-troubleshooting-faq.md, and the commented hint in .env.example).
But the Docker Compose files enumerate env vars explicitly in the environment: block and have no env_file: — so WWEBJS_WEB_VERSION set in a user's .env never reached the container. The workaround was a silent no-op for every Compose user (the most common deployment), which is why this keeps recurring. #273's reporter is on docker-compose.dev.yml, which hardcodes env and offered no way to pass it at all.
Fix
Add the passthrough to the Engine section of both compose files:
- WWEBJS_WEB_VERSION=${WWEBJS_WEB_VERSION:-}
- WWEBJS_WEB_VERSION_REMOTE_PATH=${WWEBJS_WEB_VERSION_REMOTE_PATH:-}
- Empty default ⇒ unset ⇒ whatsapp-web.js auto-selects, exactly as before — no behavior change when the user doesn't set it.
- A comment points to the troubleshooting FAQ.
- Deliberately not shipping an active default pin: a hardcoded version rots and would itself break when WhatsApp retires it — the knob stays opt-in.
Verification
- Both compose files parse as valid YAML.
- No app code touched.
After this, a Compose user who hits the hang can set WWEBJS_WEB_VERSION=<known-good> in .env and it actually takes effect.