When using gRPC connection from 1 microservice to another, we need to have a proto file which is then compiled 2 times: for both microservices.
The action of compiling takes place during the initial start/building of the dockerfile (as far as I know). Because of that, we need to have .proto files in each directory containing the dockerfile:
image just as an example to illustrate the problem
This causes repetition problem - if we want tochange communication proto between 2 services we need to do this twice violating the DNR programming principle.
Find a way to avoid repetition (is this even possible?)
what has been tried already
I have already tried having protos in the upstream directory (chat-app) and copying them during the build of the image by using COPY ../protos /home/app/protos but it is not possible because of some "context issues" - idk.
problem description
When using gRPC connection from 1 microservice to another, we need to have a proto file which is then compiled 2 times: for both microservices.
The action of compiling takes place during the initial start/building of the dockerfile (as far as I know). Because of that, we need to have .proto files in each directory containing the dockerfile: image just as an example to illustrate the problem
This causes repetition problem - if we want tochange communication proto between 2 services we need to do this twice violating the DNR programming principle.
Find a way to avoid repetition (is this even possible?)
what has been tried already
COPY ../protos /home/app/protos
but it is not possible because of some "context issues" - idk.