Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

fix: support headfull mode in puppeteer js project template

Martin Adámeke6aceb81ed07
diff --git a/packages/templates/templates/puppeteer-js/Dockerfile b/packages/templates/templates/puppeteer-js/Dockerfile
index e7e8a8a8c..decd26770 100644
--- a/packages/templates/templates/puppeteer-js/Dockerfile
+++ b/packages/templates/templates/puppeteer-js/Dockerfile
@@ -25,5 +25,6 @@ RUN npm --quiet set progress=false \
COPY --chown=myuser . ./
-# Run the image.
-CMD npm start --silent
+# Run the image. If you know you won't need headful browsers,
+# you can remove the XVFB start script for a micro perf gain.
+CMD ./start_xvfb_and_run_cmd.sh && npm run start:prod --silent