3 ms·
"# Docker hack to wait until Postgres is up, then run stuff." wat
by languagehacker 10y ago
"# Docker hack to wait until Postgres is up, then run stuff."
wat
- detaro 10y agoFTA: > We have to do some contortions with the Django devserver, because Docker doesn’t care if Postgres is ready before starting the server, so Django sees that it can’t contact the database and quits. So, we just wait until port 5432 is ready before starting the devserver.
- rspeer 10y agoThis is unfortunately necessary. docker-compose starts all services simultaneously and doesn't want you to use an init system inside the container, which means that any dependency that requires a service to be actually available needs some sort of waiting hack.