Open utterances-bot opened 3 years ago
Correct me if I'm wrong here but this will copy the full directory content into the docker image, including development dependencies and the original typescript code. Feels a bit bloated to me...
bad practice, this will copy all dev dependencies to production server
This is dangerous because mongo will be exposed on port 27017 to the outside world. When you include "PORTS" in the docker-compose file it also opens that port to the outside world through the server's firewall.
Thank you for the valuable feedback. i will be revamp this article with best practices.
Here's some discussion/explanation on that issue of exposing databases by accident. I also just learned about this and apparently a lot of big companies have been burned by this. https://www.reddit.com/r/docker/comments/rm652z/isolating_a_network_with_docker_compose/
Hi, maybe a disclaimer at the top that you're also a beginner yourself would be in place? Next to everything already mentioned using pm2
inside a docker is also very bad https://stackoverflow.com/questions/51191378/what-is-the-point-of-using-pm2-and-docker-together
Building a Production - Ready Node.js App with TypeScript and Docker
In this article, we will see how to build a Nodejs, TypeScript Application and deploy it to server with Docker.
https://cloudnweb.dev/2019/09/building-a-production-ready-node-js-app-with-typescript-and-docker/