afraid-scarlet
afraid-scarlet3y ago

Controling Crawlee run modes during runtime in Dockerized enviroment

Hi there, I am running Crawlee workers in dockerized environment and want to be able to switch between Cheerio/Playwright run modes during operation. I also want to switch between headless/headful at runtime when running Playwright crawler. Is it even possible? Right now the only workaround I managed to think is running different docker containers for cheerio/playwright and also headless/headful so that would require Cheerio, Playwright headless, Playwright headful containers, a 3 containers in total.
1 Reply
Lukas Krivka
Lukas Krivka3y ago
The Apify containers allow running both headless and headful since they start XVFB. For cheerio you don't need any extra dependencies so that is not a limitation. Check out this one https://github.com/apify/actor-templates/blob/master/templates/project_playwright_crawler_ts/.actor/Dockerfile
GitHub
actor-templates/Dockerfile at master · apify/actor-templates
This project is the :house: home of Apify actor template projects to help users quickly get started. - actor-templates/Dockerfile at master · apify/actor-templates

Did you find this page helpful?