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开发者_StackOverflow 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.
Just use the compose service name instead of ip.
精彩评论