In a docker-compose.yml file, I have 3 services. The first service is used to spin up a MySQL database. The second service is used to run several database migrations to create tables and seed data in the MySQL database created in the first service. The third service is used to run some node.js unit tests which need the MySQL database. The problem is that I need the unit tests to start only after database migrations are complete. But there is no way for me to know that.
I have tried using the depends_on configuration option in the unit tests service to make it depend on the database migration service, but as per Docker documentation, depends_on only guaranties that unit tests service starts after database migration service has started.