There is a known behavior in docker-compose related to the order services, and dependencies are started. Long story short, application authors should provide their means to verify if the dependency container is actually ready before starting the application. You can read more in official docker documentation (https://docs.docker.com/compose/startup-order/).
This PR proposes a strategy to wait for the DB dependency container to be ready and then proceed with Meican startup process.
The PR was tested with 10 repetitions, and all of them worked as expected.
Fixes #80
Description of the change
The PR was tested with 10 repetitions, and all of them worked as expected.
One example can be seen in the log here: https://gist.github.com/italovalcy/34bf60be3b5dd75e6986a2aff397def9
meican-app-dev
started before the database is ready, it keeps waiting and retrying until a point when the db is ready.