Reputation: 18524
I want to dockerize a REST Api which uses multiple microservices. Most tutorials only cover very simple cases so I am a bit stuck about how to properly dockerize such a project.
My project structure:
So it has three microservices (request-worker, request-manager and the rest-api).
My question:
Is a .dockerignore and Dockerfile for each microservice necessary or how would one properly dockerize such a mono repository project?
Upvotes: 2
Views: 597
Reputation: 721
You can create one Dockerfile per microservice, but will probably have several conflicts and problems due to the fact that they are sharing multiple files (node_modules especialy).
I recommand use one (sub)repository for each service:
And be very careful at what you put in shared
folder.
You also can use docker-compose for managing dependancies.
Upvotes: 2