Adven27 / grpc-wiremock

gRPC Mock Server
MIT License
93 stars 40 forks source link

Suggestion: mention that you can precompile proto files for faster startup? #4

Closed NielsUll closed 3 years ago

NielsUll commented 3 years ago

Hi!

We are using this for automated tests and would like it to start a bit faster. I found out that doing my own image based on thismade it start a good deal faster, as long as I didn't update the .proto files:

FROM adven27/grpc-wiremock
# copy our own proto files
COPY ./proto/*.proto /proto/
# Start image faster by compiling everything when we build the image
RUN gradle compileJava

# copy wiremock mappings and files - could also be mounted
COPY ./wiremock/mappings/* /wiremock/mappings/
COPY ./wiremock/__files/* /wiremock/__files/

Perhaps this would be worth mentioning in the readme file?

Adven27 commented 3 years ago

Hi! Great point: server generating is one of the most time-consuming parts indeed. I'll update the readme with your advice.