I am trying to set up a docker-compose file where I have 2 services. There is a RabbitMQ broker and a publisher/consumer. In the code of the publisher/consumer, I set the connection up using an IP from the os environment variables. However, I am not sure how I can get the IP of a different container, and set it in the ENV variable.
CodePudding user response:
Just use the compose service name instead of ip.