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 #!/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