sinnbeck / laravel-served

Docker version of artisan serve (with alot more)
MIT License
74 stars 13 forks source link

Puppeteer #29

Open sinnbeck opened 4 years ago

sinnbeck commented 4 years ago

I am working on getting puppeteer support up and running. I can get it working by installing chrome manually, setting ->noSandbox() when using it. From what I can read, this is bad practice, and I would rather not force people to add ->noSandbox() to code, that is going into production.

https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#setting-up-chrome-linux-sandbox

@louis-l

sinnbeck commented 4 years ago

I managed to get it working using explicitly setting user in the php Dockerfile

USER served

and adding these run options to the php container.

--shm-size=1gb \
--privileged \

Sadly I takes like 20 seconds to take a screenshot of google.com (8 seconds for the welcome view html in laravel). I cant believe that this is how its supposed to work

Edit: after a reboot the time is down to 6 seconds, but that still seems incredibly slow.