koalaok
koalaok

Reputation: 5740

How to orchestrate multiple microservices on local env?

at the moment of speaking I have a bunch of services running each one on its own container Every repo of code has its own Docker file and docker compose file in order to bring up the service on my local dev-machine

Everything is fine and I'm able o access each service at

http://localhost:[service mapped/exposed port]

Problem is that services are augmenting and I'm thinking that could be a better idea to have everything in a local private network, where each service 's container has its own IP address.

Is this a better approach to orchestrate containers locally?

Where should I start from to make up my mind?

Upvotes: 2

Views: 2419

Answers (1)

herm
herm

Reputation: 16315

Ideally you would describe your entire setup in one or multiple docker compose files. See the documentation for details.

Concerning networking and linking your services: Docker compose supports networking. You can define networks and all services which are in the same network can access each other with their serviceName and internal port (as the application knows it). E.g : http://mySuperService:3001

In case you want multiple replicas of your services or maybe multiple machines you would need to look into orchestrators such as docker swarm (easyest to start with) or Kubernetes or others.

Upvotes: 1

Related Questions