entrypoint

This commit is contained in:
Irwan Cahyono 2025-08-07 23:23:20 +07:00
parent a5e199d420
commit 0216751834

View File

@ -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