How Do You Set Up Local Microservices Development with Docker Compose?
dev.toΒ·6hΒ·
Discuss: DEV
Flag this post

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…

Similar Posts

Loading similar posts...