Readiness of database server and web server

I have two docker images: SQL Server and Web Server.
Each takes 30 seconds to start.
Web Server start-up should wait for SQL Server readiness.
Selenium tests should wait for Web Server readiness.

How do I do that?

You can follow the documentation for readiness here https://codefresh.io/docs/docs/codefresh-yaml/service-containers/#checking-readiness-of-a-service