mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-12 01:39:58 +02:00
Refactors Dockerfile and entrypoint script for enhanced reliability and Node.js 18 compatibility, including database migration. Replit-Commit-Author: Agent Replit-Commit-Session-Id: dec54137-d5a2-4406-8ad4-5f2f9fb110bf Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/5d315300-98fa-429a-abb0-4fdce6a2e3c9.jpg
21 lines
575 B
Bash
21 lines
575 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
echo "🚀 RegisFlow Production Startup"
|
|
echo "Database URL: ${DATABASE_URL:0:30}..."
|
|
|
|
# Attendre que PostgreSQL soit disponible
|
|
echo "⏳ Waiting for PostgreSQL..."
|
|
until pg_isready -h $(echo $DATABASE_URL | cut -d'/' -f3 | cut -d':' -f1) -p $(echo $DATABASE_URL | cut -d':' -f4 | cut -d'/' -f1) > /dev/null 2>&1; do
|
|
echo "PostgreSQL is unavailable - sleeping"
|
|
sleep 2
|
|
done
|
|
|
|
echo "✅ PostgreSQL is ready!"
|
|
|
|
# Migrer la base de données
|
|
echo "🔄 Running database migrations..."
|
|
npm run db:push
|
|
|
|
echo "🎯 Starting RegisFlow application..."
|
|
exec "$@" |