You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Django's runserver relies on a working database connection during startup. If this is not the case runserver fails entirely and the container has to be restarted.
To circumvent that, the runserver call should be wrapped in a function that checks if the postgres database is up and running.
This only affects the development environment. Production is fine.
The text was updated successfully, but these errors were encountered:
Maybe placing this file (wait-for-it.sh) in the utilities directory could be useful? The script waits for the host and port to spin up (with a timeout) before exiting. The command in docker-compose would then be changed to the following:
Django's
runserver
relies on a working database connection during startup. If this is not the caserunserver
fails entirely and the container has to be restarted.To circumvent that, the
runserver
call should be wrapped in a function that checks if the postgres database is up and running.This only affects the development environment. Production is fine.
The text was updated successfully, but these errors were encountered: