Helping hospitals find qualified medicine students (Hackathon #wirvsvirus). A more flexibel version is currently in development under match4everyone/match4everything,
Describe the bug
When db container is not running the main app container will stop
To Reproduce
Steps to reproduce the behavior:
Introduce a config change that will cause the database to fail to come up
run docker-compose up or deploy.sh
Error
django.db.utils.OperationalError: could not translate host name "database" to address: Name or service not known
Expected behavior
the main app container should wait for the database to become available:
The problem of waiting for a database (for example) to be ready is really just a subset of a much larger problem of distributed systems. In production, your database could become unavailable or move hosts at any time. Your application needs to be resilient to these types of failures.
Additional context
The script should indicate clearly that it's waiting for the database to come up. In Build environments it should probably timeout after a while?
Describe the bug When db container is not running the main app container will stop
To Reproduce Steps to reproduce the behavior:
Expected behavior the main app container should wait for the database to become available:
(Docs on https://docs.docker.com/compose/startup-order/)
Additional context The script should indicate clearly that it's waiting for the database to come up. In Build environments it should probably timeout after a while?