refaktorálás javításai
This commit is contained in:
24
backend/app/scripts/pre_start.sh
Normal file
24
backend/app/scripts/pre_start.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "🚀 Service Finder Pre‑Start Schema Synchronization"
|
||||
echo "=================================================="
|
||||
|
||||
# Ensure we are in the correct directory (should be /app inside container)
|
||||
cd /app
|
||||
|
||||
# Run the unified database synchronizer with --apply flag
|
||||
echo "📦 Running unified_db_sync.py --apply..."
|
||||
python -m app.scripts.unified_db_sync --apply
|
||||
|
||||
# Verify that the sync succeeded
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✅ Schema synchronization completed successfully."
|
||||
else
|
||||
echo "❌ Schema synchronization failed. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Start the FastAPI application
|
||||
echo "🌐 Starting FastAPI server..."
|
||||
exec uvicorn app.main:app --host 0.0.0.0 --port 8000
|
||||
Reference in New Issue
Block a user