Day-23 🐳 Dockerizing a 3-Tier MERN App & Diving into ITSM Tools
Source: Dev.to

Today was a massive step forward in my DevOps journey. I moved away from simply running containers individually and tackled Dockerizing a full 3‑tier MERN application (MongoDB, Express/Node, React).
🏗️ The Project: 3‑Tier Architecture
Instead of running npm start in three different terminals, I wanted to containerize the entire stack.
- Frontend: React (running in a container)
- Backend: Node.js/Express (API layer)
- Database: MongoDB (persistent storage)
🐙 Orchestration with Docker Compose
The real game‑changer today was using Docker Compose. Writing a docker‑compose.yml allowed me to define the lifecycle of all three containers in a single file.
- Defined services for the client, server, and database.
- Set up networking so they could talk to each other (using service names as hostnames).
- Configured volumes for data persistence.
Now bringing up the whole environment is just:
docker-compose up --build
🐛 The “Gotcha” Moment
It wouldn’t be a coding day without an error. Everything worked perfectly on my local setup, but the moment I spun up the container it crashed with a binary compatibility error.
The issue was that the COPY . . command was copying my local Windows‑based node_modules into the Linux container. Since esbuild and other binaries are OS‑specific, the Linux container couldn’t run the Windows binaries.
How I Resolved It
- Created a
.dockerignorefile to explicitly excludenode_modulesand.git. - Deleted the corrupted image.
- Rebuilt the image using the
--no-cacheflag to ensure a completely fresh installation.
After updating the configuration, the containers communicated perfectly.
🏢 Beyond Code: ITSM Tools
While waiting for builds, I stepped back to learn about the “process” side of DevOps. I explored:
- Jira & Confluence: Tracking tasks and documentation.
- ServiceNow: Incident Management (handling outages) and Change Management (safely deploying updates).
Understanding how these tools fit into the CI/CD pipeline is crucial for working in enterprise environments.
🚀 What’s Next?
I have conquered Docker Compose. The natural next step? Orchestration at scale. Starting tomorrow, I’m diving into Kubernetes (K8s). Can’t wait to see how pods and services compare to what I did today.
LinkedIn: