Open hyperknot opened 3 years ago
I have met a similar problem. I used pm2-dev
as runtime in docker container, and I enabled the watch option in the configuration file, and I did the --mount
bind when I ran the docker run
command, the docker container ran successfully, but when I changed the source file, the server can't detect any change.
this is the run command:
docker run -dp 8002:8002 \
--mount type=bind,source=${PWD},target=/app \
--name blog-backend-dev \
blog-express-dev
and it shows that Watch and Restart is enabled
So, why doesn't the watch feature work ?
What's going wrong?
yarn pm2-dev server.js
usually doesn't pick up file changes in server.js. Once in a while it works, but usually it doesn't.yarn pm2-runtime start server.js --watch
always picks up file changes, 100% reliably.How could we reproduce this issue?
Create an empty
server.js
and putconsole.log(1)
into it. Change 1 -> 2.Supporting information