node:6.1.0 image with nodemon & forever for livereload-like experience. For more info please check this blog post.
Edit your package.json, add the following to the scripts.start
property:
forever -l log.txt -o out.txt -e err.txt --spinSleepTime 10000 --minUptime 5000 -c 'nodemon --exitcrash ' FILENAME_HERE"
Replace FILENAME_HERE
with your nodejs app executable.
Use the -v
(volume) flag to mount your app directory to /usr/src/app
.
docker run -it --rm -v $(pwd):/usr/src/app francolaiuppa/docker-nodemon-forever