entrypoint
This commit is contained in:
parent
a5e199d420
commit
0216751834
@ -1,10 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Tunggu sampai DB siap (gunakan jika perlu)
|
DB_HOST=${DB_HOST:-localhost}
|
||||||
# echo "Waiting for postgres..."
|
DB_PORT=${DB_PORT:-5432}
|
||||||
while ! nc -z db 5432; do
|
|
||||||
|
echo "Waiting for PostgreSQL at $DB_HOST:$DB_PORT..."
|
||||||
|
|
||||||
|
while ! nc -z "$DB_HOST" "$DB_PORT"; do
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "PostgreSQL started"
|
echo "PostgreSQL started"
|
||||||
|
|
||||||
python manage.py makemigrations --noinput
|
python manage.py makemigrations --noinput
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user