My goal is simple – it is to create a script that sets up my local environment before tests are ran, and logs of my containers are vital to that – sometimes, due to some env changes, the startup fails and I need to see immediately what went wrong.
So I’ve been trying to figure out a way how to start Docker Compose in detached mode, but still keep the logs streaming until either all services are healthy, or until one fails.
My best guess for now was to just poll healthiness every couple of seconds and also fetching logs during that poll, but that is an awful solution.