Files
2026-09-22 00:50:30 +05:00

16 lines
335 B
Bash
Executable File

#!/bin/sh
set -e
if [ -n "$POSTGRES_HOST" ]; then
echo "Waiting for postgres at $POSTGRES_HOST:${POSTGRES_PORT:-5432}..."
while ! nc -z "$POSTGRES_HOST" "${POSTGRES_PORT:-5432}"; do
sleep 0.2
done
echo "PostgreSQL is up"
fi
echo "Applying database migrations..."
python manage.py migrate --noinput
exec "$@"