If you're using docker you can use https://github.com/jwilder/dockerize
Worked great last time I used it. Has more features than just waiting for a port too.