Revert "Remove health-check for Postgres (it's now in docker-compose.yml)"
Some checks failed
continuous-integration/drone/pr Build is failing
Some checks failed
continuous-integration/drone/pr Build is failing
This reverts commit 0f1211fa83
.
This commit is contained in:
parent
a835db6ab9
commit
24f3c30a41
|
@ -1,5 +1,16 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Waiting for postgres..."
|
||||||
|
|
||||||
|
POSTGRES_PORT=${POSTGRES_PORT:-5432}
|
||||||
|
POSTGRES_HOST=${POSTGRES_HOST:-localhost}
|
||||||
|
|
||||||
|
while ! nc -z "$POSTGRES_HOST" "$POSTGRES_PORT"; do
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "PostgreSQL started"
|
||||||
|
|
||||||
# Only migrate, collectstatic and compilemessages if we are NOT in development
|
# Only migrate, collectstatic and compilemessages if we are NOT in development
|
||||||
if [ -z "$DEBUG" ]; then
|
if [ -z "$DEBUG" ]; then
|
||||||
python src/manage.py migrate;
|
python src/manage.py migrate;
|
||||||
|
|
Loading…
Reference in a new issue