Traefik in front of other reverse proxy takes several minutes to work (otherwise 404)

I use Traefik in front of a self-hosted application called Ryot.
This worked fine until there was an update to Ryot which apparently introduced Caddy as a reverse proxy inside the container image.
Now when I start the container it takes ~5 min until I can reach Ryot through Traefik.
Until then, I just get 404 page not found.
Weirdly however, I get an immediate response when I request Ryot from inside its container like curl -L localhost:8000.

I have already described this issue to the Ryot dev who sees no issue on his end.
There you also find some logs and my docker compose.

ryot has a depends_on for the database. Maybe that takes long, then ryot only gets a healthy status very late and Traefik waits for it.

Try to run docker ps multiple times during startup to monitor health status of all 3.

Thanks but it even happens when the db has been up and healthy for long and removing the depends_on does not fix it either.