-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--watch is not reloading when host file changes #8
Comments
Any updates? |
It works, please look at this
|
I can't get it to work by passing |
I think the reason this is not working for some is due to the volume mount directly on the This works for me:
|
TL;DR - if you are using windows, do not use WSL2 backend in order for the sync to work. See: docker/for-win#8479 In case you are trying to change the file from a windows box and have json-server automatically sync it and display the correct file - it might not work depending on the docker version you are using and whether you are using WSL2 engine. I have tried it using docker desktop 3.2.2. It did not work using the Dockerfile from this repo and my own Dockerfile. The interesting part is if you do |
services:
|
I passed the --watch argument.
when db.json file changes in host machine the changes also obviously reflects inside docker container /data/db.json since volume mounted. But it still supplies the old db.json values.
The file is changed Right ?
When Post through curl it works properly. Restarting docker container it works properly.
Changing file directly not working (--watch)
The text was updated successfully, but these errors were encountered: