Spaces:
Sleeping
Sleeping
File size: 1,942 Bytes
67f25fb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
#!/bin/bash
echo "========================================"
echo " Multi-Lingual Catalog Translator"
echo " Docker Deployment"
echo "========================================"
echo
echo "π§ Checking Docker installation..."
if ! command -v docker &> /dev/null; then
echo "β Docker not found! Please install Docker"
echo "π₯ Visit: https://docs.docker.com/get-docker/"
exit 1
fi
echo "β
Docker found"
if ! command -v docker-compose &> /dev/null; then
echo "β Docker Compose not found! Please install Docker Compose"
echo "π₯ Visit: https://docs.docker.com/compose/install/"
exit 1
fi
echo "β
Docker Compose found"
echo
echo "ποΈ Building and starting containers..."
echo "This may take several minutes on first run..."
echo
docker-compose up --build -d
if [ $? -ne 0 ]; then
echo "β Failed to start containers"
echo
echo "π Checking logs:"
docker-compose logs
exit 1
fi
echo
echo "β
Containers started successfully!"
echo
echo "β³ Waiting for services to be ready..."
sleep 30
echo
echo "π Checking service health..."
docker-compose ps
echo
echo "π± Access your application:"
echo "π Frontend UI: http://localhost:8501"
echo "π Backend API: http://localhost:8001"
echo "π API Docs: http://localhost:8001/docs"
echo
echo "π‘ Useful commands:"
echo " View logs: docker-compose logs -f"
echo " Stop services: docker-compose down"
echo " Restart: docker-compose restart"
echo
echo "π Docker deployment complete!"
echo "Opening frontend in browser..."
# Try to open browser
if command -v xdg-open &> /dev/null; then
xdg-open http://localhost:8501
elif command -v open &> /dev/null; then
open http://localhost:8501
else
echo "Please open http://localhost:8501 in your browser"
fi
echo
echo "π Following logs (Press Ctrl+C to stop):"
echo "----------------------------------------"
docker-compose logs -f
|