-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-langfuse.sh
More file actions
executable file
·64 lines (55 loc) · 2.06 KB
/
Copy pathsetup-langfuse.sh
File metadata and controls
executable file
·64 lines (55 loc) · 2.06 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
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
# Langfuse Setup Script for AI Chat Application
set -e
echo "🚀 Setting up AI Chat with Langfuse..."
# Check if .env exists, if not copy from example
if [ ! -f .env ]; then
echo "📝 Creating .env file from .env.example..."
cp .env.example .env
echo "✅ .env file created. Please update it with your API keys."
else
echo "📝 .env file already exists."
fi
# Check if Docker and Docker Compose are installed
if ! command -v docker &> /dev/null; then
echo "❌ Docker is not installed. Please install Docker first."
exit 1
fi
if ! docker compose version &> /dev/null; then
echo "❌ Docker Compose is not available. Please install Docker with Compose plugin."
exit 1
fi
echo "🐳 Starting Langfuse services with Docker Compose..."
docker compose up -d postgres langfuse
echo "⏳ Waiting for services to start..."
sleep 30
# Check if services are running
if docker compose ps | grep -q "Up"; then
echo "✅ Services are running!"
echo ""
echo "🌐 Access URLs:"
echo " • AI Chat Application: http://localhost:8501"
echo " • Langfuse Dashboard: http://localhost:3000"
echo ""
echo "🔑 Default Langfuse Credentials:"
echo " • Email: admin@localhost"
echo " • Password: admin123"
echo ""
echo "📋 Next Steps:"
echo " 1. Open Langfuse at http://localhost:3000"
echo " 2. Login with the default credentials"
echo " 3. Go to Settings → API Keys"
echo " 4. Generate new API keys"
echo " 5. Update your .env file with:"
echo " LANGFUSE_SECRET_KEY=your_generated_secret_key"
echo " LANGFUSE_PUBLIC_KEY=your_generated_public_key"
echo " 6. Start the AI Chat application:"
echo " docker compose up ai-chat"
echo " OR for development with file watching:"
echo " docker compose -f docker-compose.dev.yml up ai-chat"
echo ""
echo "🎉 Langfuse setup complete! Start your AI Chat application when ready."
else
echo "❌ Some services failed to start. Check logs with: docker compose logs"
exit 1
fi