mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-11 17:29:48 +02:00
Fixes "docker-entrypoint.sh not found" and improves Dockerfile for proper entrypoint execution and adds docker-test-quick.sh. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 4b008663-bd72-492b-b0b6-fa252367e730 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/4b008663-bd72-492b-b0b6-fa252367e730/DWp0Qa4
63 lines
1.6 KiB
Bash
Executable File
63 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
echo "🐳 RegisFlow Docker Quick Test"
|
|
echo "=============================="
|
|
|
|
# Nettoyer les anciens containers
|
|
echo "🧹 Cleaning up existing containers..."
|
|
docker-compose down -v 2>/dev/null || true
|
|
docker system prune -f >/dev/null 2>&1 || true
|
|
|
|
# Test de build
|
|
echo "🔨 Building fresh Docker image..."
|
|
if docker-compose build --no-cache regisflow; then
|
|
echo "✅ Build successful"
|
|
else
|
|
echo "❌ Build failed"
|
|
exit 1
|
|
fi
|
|
|
|
# Créer .env.production si nécessaire
|
|
if [[ ! -f ".env.production" ]]; then
|
|
echo "📝 Creating .env.production from example..."
|
|
cp .env.production.example .env.production
|
|
fi
|
|
|
|
# Test de démarrage
|
|
echo "🚀 Starting containers..."
|
|
if docker-compose up -d; then
|
|
echo "✅ Containers started"
|
|
|
|
# Attendre l'application
|
|
echo "⏳ Waiting for application..."
|
|
for i in {1..30}; do
|
|
if curl -s http://localhost:5000/health >/dev/null 2>&1; then
|
|
echo "✅ Application is responding!"
|
|
echo "🏥 Health: $(curl -s http://localhost:5000/health | grep -o '"status":"[^"]*"' || echo 'OK')"
|
|
break
|
|
fi
|
|
echo " Attempt $i/30..."
|
|
sleep 2
|
|
done
|
|
|
|
if [ $i -eq 30 ]; then
|
|
echo "❌ Application timeout"
|
|
echo "📋 Recent logs:"
|
|
docker-compose logs --tail=10 regisflow
|
|
exit 1
|
|
fi
|
|
|
|
else
|
|
echo "❌ Container startup failed"
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
echo "🎉 SUCCESS! RegisFlow is running"
|
|
echo "================================"
|
|
echo "Access: http://localhost:5000"
|
|
echo "Admin: admin / admin123"
|
|
echo ""
|
|
echo "To stop: docker-compose down"
|
|
echo "To see logs: docker-compose logs -f" |