I have a setup with 3 docker containers, containerX use RabbitMQ for communication.
- RabbitMQ container
- Container1
- Container2
Issue - When docker compose up is run, RabbitMq takes ~2s to be ready, by then the other containers start and exit as rabbimq is not up yet.
With restart: on-failure in compose file, the other containers are up once rabbitmq container is ready
Is there a way to avoid this and request other containers to wait until rabbitMQ(or a specific container) is up
or a possibility where once a docker container is up it triggers another docker container to start