p5.js-web-editor
p5.js-web-editor copied to clipboard
File Changes Not Reflecting in Docker Container
File Changes Not Reflecting in Docker Container
Environment:
- OS: Windows
- WSL2: Enabled
- Docker: Using Docker Desktop with WSL2 integration
Description: I am trying to set up this project locally using Docker with the provided development Docker Compose setup. However, I am facing an issue where changes made to the files on my local machine are not reflecting in the Docker container.
Docker Compose Configuration:
services:
mongo:
image: mongo:5.0
volumes:
- dbdata:/data/db
app:
build:
context: ./
dockerfile: Dockerfile
target: development
environment:
- MONGO_URL=mongodb://mongo:27017/p5js-web-editor
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
ports:
- '8000:8000'
- '8002:8002'
depends_on:
- mongo
volumes:
dbdata:
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.
Hey @AbhigyanSrivastav were you able to resolve this issue? Even i am facing the exact same issue need help
Hi , i have created a PR that i think should solve this problem , review required
Hey! , I have checked this issue again and i think there is no problem now , the file syncing works even without ":cached" (though i think it will fix that if its not working without it) . I think that this issue #3246 can be closed now!!
@AbhigyanSrivastav @raclim File syncing in Docker Compose with WSL2 may experience performance bottlenecks. To enhance file sharing efficiency, We need to use :cached option in the volume configuration. This change needs to be done in the docker-compose.yml file.
Soon i will create a PR which will fix this issue.
Thanks for raising this issue!
I want to note that I think adding the flag might not be the full resolution to this issue, as it seems that adding the :cached flag is no longer needed as it's already set as a default in Docker Desktop 2.4.0.
@AbhigyanSrivastav maybe you Have to Go through Docker Documentation for windows they requires docker sync and other dependenct for windows synchoronization updates
https://docker-sync.readthedocs.io/en/latest/getting-started/installation.html#installation-windows
Docker on Windows (especially with Windows Subsystem for Linux (WSL) or Docker Desktop) can have specific issues with file synchronization and live reload due to differences in how the file system works compared to Linux.
@AbhigyanSrivastav maybe you Have to Go through Docker Documentation for windows they requires docker sync and other dependenct for windows synchoronization updates https://docker-sync.readthedocs.io/en/latest/getting-started/installation.html#installation-windows
Docker on Windows (especially with Windows Subsystem for Linux (WSL) or Docker Desktop) can have specific issues with file synchronization and live reload due to differences in how the file system works compared to Linux.
Thanks for the suggestion! I’ve already gone through the documentation and tried some workarounds, but they didn’t seem to resolve the issue. However, I’ve now successfully cloned the project onto my machine.