Open soosap opened 7 years ago
I am facing the same issue. Any updates?
I had the same issue. Took me 2 hours to find this...
When working with NFS devices you’ll need to set usePolling: true as stated in this chokidar issue.
Bottom of the page: http://pm2.keymetrics.io/docs/usage/watch-and-restart/
As stated by @hehachris adding usePolling: true
in the ecosystem.config.js file worked for me.
module.exports = {
apps: [
{
name: 'token',
script: 'app.js',
watch: true,
"watch_options": {
usePolling: true
},
env: {
PORT: 3002
},
env_production: {
NODE_ENV: 'production'
}
}
]
};
I have the following docker-compose.yml file:
I am further using the following process.yml pm2 configuration:
The app starts alright. Unfortunately, it does not react to file changes.
docker exec -it <container_id> sh
'ing into the container, I see that the file changes are propagated correctly. Yet, the server is not being restarted from within the container.Trying the same thing outside a docker container works as expected. File changes trigger a restart with pm2-dev.