There is a race condition when bring up this stack with Docker Compose, the application will start before the MySQL instance is ready, preventing the schema being loaded and the seeding from occurring which poisons the stack's persistence.
The db service in the docker-compose.yml should have a health check, such as:
There is a race condition when bring up this stack with Docker Compose, the application will start before the MySQL instance is ready, preventing the schema being loaded and the seeding from occurring which poisons the stack's persistence.
The
db
service in the docker-compose.yml should have a health check, such as:The
app
service in the docker-compose.yml should requiredb
as a health dependency , such as: