This commit is contained in:
2025-05-26 22:26:27 -05:00
parent 7bff7f0bd3
commit f4bcf72b9b

View File

@ -1,6 +1,15 @@
#!/bin/bash
set -e
# Wait for the database service to be ready
DB_HOST=${DB_HOST:-db}
DB_PORT=${DB_PORT:-3306}
echo "[⏳] Waiting for database at $DB_HOST:$DB_PORT..."
until nc -z $DB_HOST $DB_PORT; do
sleep 1
done
echo "[✔] Database is up and reachable"
# Initialize migrations folder if needed
if [ ! -d migrations ]; then
echo "[✔] Initializing migrations directory"