Member-only story

Docker Advance Part 5: Separation of Concern in Docker Compose

Mammad Yahyayev
DevOps.dev
Published in
3 min readJan 2, 2025

--

My articles are open to everyone; non-member readers can read the full article by clicking this link.

Hello developers, welcome back to my Docker Advanced Series where we break down complex Docker concepts into easy-to-digest lessons. If you are new here, you can access the whole series from here.

In today’s post, I am going to show how you can use Separation of Concern in Docker Compose file.

Big Bowl of Mud in Docker Compose

Most of the time I see in projects, developers put every Docker service in one file which makes it unreadable, because file contains more than 100 lines. In order to find something you have to read the whole file.

Let’s say we have a Postgres Database which 3 of your services such as users-service, payment-service, transaction-service. These services are all Spring Boot projects but could be any. Following is a big docker compose file that contains more than 100 lines and could be longer than that.

--

--

Published in DevOps.dev

Devops.dev is a community of DevOps enthusiasts sharing insight, stories, and the latest development in the field.

Written by Mammad Yahyayev

I am a Software Engineer with 4 years of work experience. I love to share my ideas, knowledge with everybody. Follow me to stay updated on the latest trends.

No responses yet

What are your thoughts?