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