-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathstart-with-llm.sh
More file actions
executable file
·51 lines (40 loc) · 1.79 KB
/
start-with-llm.sh
File metadata and controls
executable file
·51 lines (40 loc) · 1.79 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
# Script to start Docker services with LLM support
# This script reads your SENTINEL_APP_ANTHROPIC_API_KEY from your environment
set -e
# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
echo -e "${GREEN}Starting Sentinel Platform with LLM Support${NC}"
# Check if API key is set in environment
if [ -z "$SENTINEL_APP_ANTHROPIC_API_KEY" ]; then
echo -e "${YELLOW}Warning: SENTINEL_APP_ANTHROPIC_API_KEY not found in environment${NC}"
echo "Please set it in your .zshrc or .bashrc:"
echo " export SENTINEL_APP_ANTHROPIC_API_KEY='your-api-key-here'"
echo ""
echo "Or run this command with the key:"
echo " SENTINEL_APP_ANTHROPIC_API_KEY='your-key' ./start-with-llm.sh"
exit 1
fi
# Export the API key so Docker Compose can use it
export SENTINEL_APP_ANTHROPIC_API_KEY="$SENTINEL_APP_ANTHROPIC_API_KEY"
echo -e "${GREEN}✓ Anthropic API key found${NC}"
# Update .env.docker with the actual API key (temporary for this session)
# Create a temporary env file with the actual key
cp sentinel_backend/.env.docker sentinel_backend/.env.docker.tmp
sed -i '' "s|\${SENTINEL_APP_ANTHROPIC_API_KEY:-your-api-key-here}|$SENTINEL_APP_ANTHROPIC_API_KEY|" sentinel_backend/.env.docker.tmp
# Start Docker services with the temporary env file
echo -e "${GREEN}Starting Docker services...${NC}"
docker-compose --env-file sentinel_backend/.env.docker.tmp up -d --build
# Clean up temporary file
rm -f sentinel_backend/.env.docker.tmp
echo -e "${GREEN}✓ Services started successfully!${NC}"
echo ""
echo "You can now access:"
echo " - Frontend: http://localhost:3000"
echo " - API Gateway: http://localhost:8000"
echo " - RabbitMQ: http://localhost:15672 (guest/guest)"
echo ""
echo -e "${GREEN}LLM Support is ENABLED with Anthropic Claude${NC}"