So im having trouble getting mine to work. I just created a plain index.js with console.log('hello world'), my startup script says nodemon index.js which successfully runs the index file and monitors for changes. But when I change the index.js in VSCode it never updates in the container. It just says "watching for changes before restart". This works locally BTW, if I change the index running without docker, it detects the change and updates. Is something wrong with my volumes? I set COMPOSE_CONVERT_WINDOWS_PATHS=1
You should just have to clone and run docker-compose up and then edit the index.js and notice nodemon never sees the file change, and does not restart the process.
In the meantime, I've put together a working Node.js Express app setup that rebuilds with Nodemon on file changes github.com/blacksonic/node-docker-...
I don't know what is watched by Nodemon with the default setting, but to be sure I've specified what to watch, maybe that is the missing piece in your code.
So im having trouble getting mine to work. I just created a plain index.js with
console.log('hello world')
, my startup script saysnodemon index.js
which successfully runs the index file and monitors for changes. But when I change the index.js in VSCode it never updates in the container. It just says "watching for changes before restart". This works locally BTW, if I change the index running without docker, it detects the change and updates. Is something wrong with my volumes? I setCOMPOSE_CONVERT_WINDOWS_PATHS=1
I've tested the setup again with Vue CLI and it detects changes. Next week I'll be working on the Node.js workflow.
Can you show an example repo?
Sorry it took so long for me to get back to you, here is the repo github.com/VictorioBerra/docker-co...
You should just have to clone and run
docker-compose up
and then edit theindex.js
and notice nodemon never sees the file change, and does not restart the process.In the meantime, I've put together a working Node.js Express app setup that rebuilds with Nodemon on file changes github.com/blacksonic/node-docker-...
I don't know what is watched by Nodemon with the default setting, but to be sure I've specified what to watch, maybe that is the missing piece in your code.
This fixed my issue github.com/remy/nodemon#applicatio...