-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·51 lines (44 loc) · 1.64 KB
/
Copy pathstart.sh
File metadata and controls
executable file
·51 lines (44 loc) · 1.64 KB
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
#!/bin/bash
# Support System Quick Start Script
echo "🚀 Starting Support System..."
# Check if Docker is available
if ! command -v docker &> /dev/null; then
echo "❌ Docker is not installed. Please install Docker first."
exit 1
fi
if ! command -v docker-compose &> /dev/null; then
echo "❌ Docker Compose is not installed. Please install Docker Compose first."
exit 1
fi
# Create .env file if it doesn't exist
if [ ! -f .env ]; then
echo "📝 Creating .env file from template..."
cp .env.example .env
echo "⚠️ Please edit .env file with your configuration (especially HUGGINGFACE_API_KEY for LLM features)"
fi
# Start the services
echo "🐳 Starting Docker services..."
docker-compose up -d
# Wait for services to be ready
echo "⏳ Waiting for services to start..."
sleep 10
# Check if API is responding
echo "🔍 Checking API health..."
if curl -f http://localhost/health > /dev/null 2>&1; then
echo "✅ Support System is running successfully!"
echo ""
echo "🌐 Available endpoints:"
echo " - API Documentation: http://localhost/docs"
echo " - Health Check: http://localhost/health"
echo " - API Base URL: http://localhost/api/v1"
echo ""
echo "📚 Example API calls:"
echo " curl http://localhost/health"
echo " curl -X POST http://localhost/api/v1/documents/ -H 'Content-Type: application/json' -d '{\"title\":\"Test\",\"content\":\"Content\",\"category\":\"test\",\"tags\":[]}'"
echo ""
echo "🔧 To stop: docker-compose down"
echo "📖 For more info, see README.md"
else
echo "❌ API is not responding. Check logs with: docker-compose logs"
exit 1
fi