Node.js – How to Restart a Docker Container After a Crash

I’m currently working on a Node.js application that runs within a Docker container. I wanted the container to auto-restart whenever it crashed and I found out that this task could be accomplished with tools like PM2 and forever. I decided to give PM2 a try. Unfortunately, it kept restarting the container in an …

How to Expose Your Docker Ports Only to the Local Network

I’m currently in the process of breaking a monolith application into microservices that run in Docker containers. To keep things simple, the Docker containers are going to run on the same server as the monolith – at least, for the time being. I wanted my containers to be able to communicate with each other as …