Docker Nodejs 10 + Redis + nodemon
Wed Nov 17 2021 13:19:30 GMT+0000 (Coordinated Universal Time)
Saved by @swina #nodejs #redis #nodemon
Create dockerfile in the root of your app and paste above code. Create a entrypoint-dev.sh and add following code: #!/bin/sh redis-server & cd /app && npm install&& nodemon --inspect=0.0.0.0:9229 server.js - build container: docker build . -t myapp:dev -f dockerfile - create a network with docker docker network create -d bridge webdev - run container: docker run -it --rm --net webdev --name myapp.devdocker \ -p 3000:3000 \ -p 9229:9229 \ -v $(pwd):/app \ myapp:dev - open browser localhost:3000
Comments