I have ~4 microservices, a Keycloak and a RabbitMQ Server I want to deploy via Docker. Each microservice has to be able to speak to Keycloak, and some need to speak to RabbitMQ.
To keep it clean I wanted to create a docker-compose file for Keycloak, one for RabbitMQ, and one per microservice. Is this the right way to do it? (Each microservice has its own database.)

MS A, B, C, D need to be able to call Keycloak; MS C, D needs to be able to talk to RabbitMQ.
What is the best way to connect all the microservices with the Keycloak / RabbitMQ server(s)? Some of the microservices need to be able to talk to each other as well.