It’s possible to use health checks for that kind of “wait-for-it”-s. Checkout the configuration here: https://evilmartians.com/chronicles/ruby-on-whales-docker-fo...
Note that it requires using Compose v2.4, not 3.x.
Note that it requires using Compose v2.4, not 3.x.