2026-02-07 10:23:29 -04:00
|
|
|
#!/bin/bash
|
2026-02-08 18:44:05 -04:00
|
|
|
# This script is now deprecated - database initialization is handled by docker-entrypoint.sh
|
|
|
|
|
# Kept for backward compatibility
|
|
|
|
|
|
2026-02-07 10:23:29 -04:00
|
|
|
set -e
|
|
|
|
|
|
2026-02-08 18:44:05 -04:00
|
|
|
echo "Database initialization is handled by docker-entrypoint.sh"
|
|
|
|
|
echo "This script will only wait for PostgreSQL to be ready..."
|
|
|
|
|
|
|
|
|
|
# Wait for database to be ready
|
2026-02-07 10:23:29 -04:00
|
|
|
until PGPASSWORD=$DATABASE_PASSWORD psql -h "$DATABASE_HOST" -U "$DATABASE_USER" -d "$DATABASE_NAME" -c '\q' 2>/dev/null; do
|
2026-02-08 18:44:05 -04:00
|
|
|
echo "PostgreSQL is unavailable - sleeping"
|
2026-02-07 10:23:29 -04:00
|
|
|
sleep 2
|
|
|
|
|
done
|
|
|
|
|
|
2026-02-08 18:44:05 -04:00
|
|
|
echo "PostgreSQL is up and accepting connections"
|