This is a code reference for a StackOverflow answer.
This is an example of how to synchronize docker containers, i.e. how to make some containers wait for dependant containers to start.
The idea is that every container opens up a diagnostic port which serves component's status (warming up/running). The dependant containers can then delay their start until the server is ready.
Make sure you have docker and docker-compose installed. Then just run this convenience script from the root of the cloned sources:
./run-example.sh
or call docker compose directly:
docker-compose -f app.yml build && docker-compose -f app.yml up