Use remote Chromium container instead of local Puppeteer launch

- Add browserless/chromium container to docker-compose
- Add docker-compose.dev.yml for local dev (Chromium on port 3001)
- Browser scraper connects via WebSocket (CHROMIUM_WS env var)
- Falls back to local launch if CHROMIUM_WS not set
- Remove Chromium install from Dockerfile (smaller image)
- Auto-reconnect on browser disconnect

Tested: remote Chromium connects in ~500ms, HG Spot scrapes in
~2.2s total. No longer blocks the Node.js event loop.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
mariosemes
2026-03-26 22:47:40 +01:00
parent 0e2e8d1766
commit a3ae3b248f
6 changed files with 58 additions and 17 deletions

View File

@@ -1,3 +1,4 @@
PORT=3000
DATABASE_PATH=./data/pricehunter.db
STORES_DIR=./stores
CHROMIUM_WS=ws://localhost:3001