Selecting the Compose files to run
In the previous section, one of the issues we stumbled upon is the fact that we run the application’s Compose file altogether. However, modularization is in place since we split the compose file into multiple parts. Thus, the next step would be to run debug and test different modules of the application individually.
Using Hoverfly
Since our applications depend on each other, the only viable option is to run the applications together until we find an alternative. For development and testing purposes, we can mock some of the services that introduce dependencies and still be able to run our application locally.
For this purpose, Hoverfly (https://hoverfly.io/) can be of significant help. Hoverfly can intercept traffic and mock requests and responses.
We will spin up a Hoverfly instance with a capture mode in Compose:
services: hoverfly: image: spectolabs/hoverfly ports...