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:
@@ -5,5 +5,6 @@ export const config = {
|
||||
host: process.env.HOST || '0.0.0.0',
|
||||
databasePath: process.env.DATABASE_PATH || './data/pricehunter.db',
|
||||
storesDir: process.env.STORES_DIR || './stores',
|
||||
chromiumWs: process.env.CHROMIUM_WS || '',
|
||||
isProduction: process.env.NODE_ENV === 'production',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user