-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
105 lines (96 loc) · 3.54 KB
/
Copy pathdocker-compose.yml
File metadata and controls
105 lines (96 loc) · 3.54 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
services:
# PostgreSQL database for Langfuse
postgres:
image: postgres:15
container_name: langfuse-postgres
environment:
POSTGRES_DB: langfuse
POSTGRES_USER: langfuse
POSTGRES_PASSWORD: langfuse_password
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- ai-chat-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U langfuse"]
interval: 10s
timeout: 5s
retries: 5
# Langfuse service
langfuse:
image: langfuse/langfuse:2
container_name: langfuse-server
depends_on:
postgres:
condition: service_healthy
ports:
- "3000:3000"
environment:
# Database configuration
DATABASE_URL: postgresql://langfuse:langfuse_password@postgres:5432/langfuse
# Langfuse configuration
NEXTAUTH_SECRET: your-nextauth-secret-change-this
SALT: your-salt-change-this
NEXTAUTH_URL: http://localhost:3000
TELEMETRY_ENABLED: false
# Optional: Admin user (will be created on first startup)
LANGFUSE_INIT_USER_EMAIL: admin@example.com
LANGFUSE_INIT_USER_PASSWORD: admin123
networks:
- ai-chat-network
healthcheck:
test: ["CMD-SHELL", "pgrep -f 'next-server' || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# AI Chat Application
ai-chat:
build:
context: .
dockerfile: Dockerfile
args:
- OLLAMA_BASE_URL=${OLLAMA_BASE_URL:-http://host.docker.internal:11434}
- OPENAI_API_KEY=${OPENAI_API_KEY:-your_openai_api_key_here}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-your_aws_access_key_here}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-your_aws_secret_key_here}
- AWS_REGION=${AWS_REGION:-us-east-1}
- PERPLEXITY_API_KEY=${PERPLEXITY_API_KEY:-your_perplexity_api_key_here}
- GROK_API_KEY=${GROK_API_KEY:-your_grok_api_key_here}
- GEMINI_API_KEY=${GEMINI_API_KEY:-your_gemini_api_key_here}
- LANGFUSE_ENABLED=${LANGFUSE_ENABLED:-true}
- LANGFUSE_SECRET_KEY=${LANGFUSE_SECRET_KEY:-your_langfuse_secret_key_here}
- LANGFUSE_PUBLIC_KEY=${LANGFUSE_PUBLIC_KEY:-your_langfuse_public_key_here}
- LANGFUSE_HOST=${LANGFUSE_HOST:-http://langfuse:3000}
container_name: ai-chat-app
depends_on:
langfuse:
condition: service_healthy
ports:
- "${PORT:-8501}:8501"
environment:
# AI Provider configurations
OLLAMA_BASE_URL: ${OLLAMA_BASE_URL:-http://host.docker.internal:11434}
OPENAI_API_KEY: ${OPENAI_API_KEY:-your_openai_api_key_here}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-your_aws_access_key_here}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-your_aws_secret_key_here}
AWS_REGION: ${AWS_REGION:-us-east-1}
PERPLEXITY_API_KEY: ${PERPLEXITY_API_KEY:-your_perplexity_api_key_here}
GROK_API_KEY: ${GROK_API_KEY:-your_grok_api_key_here}
GEMINI_API_KEY: ${GEMINI_API_KEY:-your_gemini_api_key_here}
# Langfuse configuration (pointing to local container)
LANGFUSE_ENABLED: ${LANGFUSE_ENABLED:-true}
LANGFUSE_SECRET_KEY: ${LANGFUSE_SECRET_KEY:-your_langfuse_secret_key_here}
LANGFUSE_PUBLIC_KEY: ${LANGFUSE_PUBLIC_KEY:-your_langfuse_public_key_here}
LANGFUSE_HOST: http://langfuse:3000
networks:
- ai-chat-network
volumes:
# Mount source code for development (comment out for production)
- ./main.py:/app/main.py:ro
networks:
ai-chat-network:
driver: bridge
volumes:
postgres_data:
driver: local