-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart.sh
More file actions
50 lines (42 loc) Β· 1.43 KB
/
start.sh
File metadata and controls
50 lines (42 loc) Β· 1.43 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
#!/bin/bash
# Instant-RAG Quick Start Script
echo "π Starting Instant-RAG Platform..."
echo ""
# Check if Docker is installed
if ! command -v docker &> /dev/null; then
echo "β Docker is not installed. Please install Docker first."
exit 1
fi
# Check if docker-compose is installed
if ! command -v docker-compose &> /dev/null && ! docker compose version &> /dev/null; then
echo "β Docker Compose is not installed. Please install Docker Compose first."
exit 1
fi
# Create necessary directories
echo "π Creating data directories..."
mkdir -p data identity
# Build and start the service
echo "π¨ Building and starting services..."
docker compose up --build -d
# Wait for service to be ready
echo "β³ Waiting for service to start..."
sleep 5
# Check if service is running
if curl -s http://localhost:8000/health > /dev/null; then
echo "β
Service is running!"
echo ""
echo "π API available at: http://localhost:8000"
echo "π API docs at: http://localhost:8000/docs"
echo ""
echo "π To create an agent token, run:"
echo " docker compose exec app python -c \"from identity.passport import passport; print('Token:', passport.issue('my-agent'))\""
echo ""
echo "π To view logs:"
echo " docker compose logs -f"
echo ""
echo "π To stop:"
echo " docker compose down"
else
echo "β Service failed to start. Check logs with: docker compose logs"
exit 1
fi