brouter-web icon indicating copy to clipboard operation
brouter-web copied to clipboard

Contributing documentation docker in VM: CHOKIDAR_USEPOLLING=true

Open printpagestopdf opened this issue 4 years ago • 2 comments

Perhaps Contributing.md shuld be enhanced by the following hint:

If Docker is used in a VM environment it could be, that gulp is not recognizing file changes. In this case yarn should be started with the environment variable CHOKIDAR_USEPOLLING set to true.

E.g.: docker-compose run --rm -p 3000:3000 -e CHOKIDAR_USEPOLLING=true serve

For me this problem occured in the special case of using Docker in a WSL2 environment. But documentation said, that this can be a problem in VM environmants in general.

printpagestopdf avatar Oct 12 '21 19:10 printpagestopdf

@schmic what do you think?

nrenner avatar Jul 13 '22 10:07 nrenner

Hi @nrenner - from my point of view I can not recommend enabling that polling option. It increases CPU load and power usage, obviously. I'm using WSL2/Docker on a daily basis and never had to do that.

There are issues in other projects - from 2016-2018 - that talk about enabling it to fix certain issues. I can imagine scenarios where filesystem events get lost by using too many layers of virtualization but this should be avoided in the first place.

Maybe @mjaschen has also an opinion here?

schmic avatar Jul 13 '22 14:07 schmic