Currently we are using docker-compose's restart to restart until database is finally booted up. We should fix this without having to depend on restart.
One example that @kratsg found could be possible solution -
https://hackernoon.com/preventing-race-conditions-in-docker-781854121ed3