{"repo":"BretFisher/node-docker-good-defaults","free":true,"listed":false,"github":"https://github.com/BretFisher/node-docker-good-defaults","clone":"git clone https://github.com/BretFisher/node-docker-good-defaults.git","description":"sample node app for Docker examples","language":"JavaScript","stars":2392,"topics":["nodejs","docker","dockerfile","docker-compose","npm","nodemon","vscode"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"Node.js + Docker for Showing Good Defaults in Using Node.js with Docker This tries to be a \"good defaults\" example of starting to use Node.js in Docker for local development and shipping to production with basic bells, whistles, and best practices. Issues/PR welcome. Note I have more advanced examples of Node.js Dockerfiles and Compose files in my DockerCon 2022 talk and repository. I also have more about everything Docker and Node.js in my 8 hour video course Docker for Node.js. Also Note , I have other resources on Docker and Kubernetes here. Local Development Features - Dev as close to prod as you can . Docker Compose builds a local development image that is just like the production image except for the below dev-only features needed in the image. The goal is to have dev environment be as close to test and prod as possible while still giving all the nice tools to make you a happy dev. - Prevent needing node/npm on host . This installs node modules outside app root in the container image so local development won't run into a problem of bind-mounting over it with local source code. This means it will run npm install once on container build and you don't need to run npm on host or on each docker run. It will re-run on build if you change package.json . - One line startup . Uses docker compose up for single-line build and run of local development server. - Edit locally while code runs in container . Docker Compose uses proper bind-mounts of host source code into container so y","default_branch":null,"files":null,"tree":[],"storefront":"/r/BretFisher","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/BretFisher/node-docker-good-defaults/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}