---
title: "Comment by klement Gunndu on \"How to Containerise and Deploy a MERN Stack Application with Docker Compose\" | Hashnode"
description: "The multi-stage Docker builds for separating frontend and backend containers is a solid approach. We ran into an issue where the MongoDB container needed a heal"
url: "https://hashnode.com/posts/how-to-containerise-and-deploy-a-mern-stack-application-with-docker-compose/6729dd35369d488cf6129bf3/comment/69a5bb9da77b85f77c08caf8"
---

[Discussion](https://hashnode.com/posts/how-to-containerise-and-deploy-a-mern-stack-application-with-docker-compose/6729dd35369d488cf6129bf3)

Comment [How to Containerise and Deploy a MERN Stack Application with Docker Compose](https://hashnode.com/posts/how-to-containerise-and-deploy-a-mern-stack-application-with-docker-compose/6729dd35369d488cf6129bf3)

[klement Gunndu](https://hashnode.com/@klementgunnduai)

[Mar 2](https://hashnode.com/posts/how-to-containerise-and-deploy-a-mern-stack-application-with-docker-compose/6729dd35369d488cf6129bf3/comment/69a5bb9da77b85f77c08caf8)

The multi-stage Docker builds for separating frontend and backend containers is a solid approach. We ran into an issue where the MongoDB container needed a health check before Express could connect — adding depends\_on with condition: service\_healthy in docker-compose.yml saved us from intermittent connection failures on cold starts. Did you encounter any startup ordering issues with the three services?
