How Do You Set Up Local Microservices Development with Docker Compose?

Hey folks,

I’m working on a small side project built around a microservices architecture — a few API services, some databases, nothing huge. The folder structure looks like this:

~/myProject/
├── docker-compose.yml
├── .git/
├── service-a/
├── serv…


This content originally appeared on DEV Community and was authored by Barış Yıldızoğlu

Hey folks,

I’m working on a small side project built around a microservices architecture — a few API services, some databases, nothing huge. The folder structure looks like this:

~/myProject/
├── docker-compose.yml
├── .git/
├── service-a/
├── service-b/
└── service-c/

When I run everything with docker-compose up, my code is on my own local machine, but dependencies live inside the containers, so VS Code keeps throwing lint/type errors (since node_modules or pip packages aren’t on my local machine).

If I try using Dev Containers and attach directly to a service, it works better — except that the .git folder isn’t mounted inside the container, so Git integration (history, branches, etc.) breaks inside VS Code. So my questions are:

  1. How do you handle this local vs container dev setup cleanly?
  2. Any best practices for microservice development with Docker Compose + VS Code Dev Containers?
  • Should I just mount the whole project, including .git, into the containers?
  • Maybe set up multi-stage Dev Containers?
  • Or is it better to keep containers running but code outside and sync changes somehow?
  • Or something else?

Would love to see how others structure their setups

Thanks in advance!


This content originally appeared on DEV Community and was authored by Barış Yıldızoğlu


Print Share Comment Cite Upload Translate Updates
APA

Barış Yıldızoğlu | Sciencx (2025-11-06T19:12:03+00:00) How Do You Set Up Local Microservices Development with Docker Compose?. Retrieved from https://www.scien.cx/2025/11/06/how-do-you-set-up-local-microservices-development-with-docker-compose/

MLA
" » How Do You Set Up Local Microservices Development with Docker Compose?." Barış Yıldızoğlu | Sciencx - Thursday November 6, 2025, https://www.scien.cx/2025/11/06/how-do-you-set-up-local-microservices-development-with-docker-compose/
HARVARD
Barış Yıldızoğlu | Sciencx Thursday November 6, 2025 » How Do You Set Up Local Microservices Development with Docker Compose?., viewed ,<https://www.scien.cx/2025/11/06/how-do-you-set-up-local-microservices-development-with-docker-compose/>
VANCOUVER
Barış Yıldızoğlu | Sciencx - » How Do You Set Up Local Microservices Development with Docker Compose?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/11/06/how-do-you-set-up-local-microservices-development-with-docker-compose/
CHICAGO
" » How Do You Set Up Local Microservices Development with Docker Compose?." Barış Yıldızoğlu | Sciencx - Accessed . https://www.scien.cx/2025/11/06/how-do-you-set-up-local-microservices-development-with-docker-compose/
IEEE
" » How Do You Set Up Local Microservices Development with Docker Compose?." Barış Yıldızoğlu | Sciencx [Online]. Available: https://www.scien.cx/2025/11/06/how-do-you-set-up-local-microservices-development-with-docker-compose/. [Accessed: ]
rf:citation
» How Do You Set Up Local Microservices Development with Docker Compose? | Barış Yıldızoğlu | Sciencx | https://www.scien.cx/2025/11/06/how-do-you-set-up-local-microservices-development-with-docker-compose/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.