-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (70 loc) · 1.67 KB
/
docker-compose.yml
File metadata and controls
76 lines (70 loc) · 1.67 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
version: '3.8'
services:
# Redis - 短期记忆存储
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --maxmemory 256mb --maxmemory-policy allkeys-lru
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
# Python实现
python-agent:
build:
context: ./python-impl
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_BASE_URL=${OPENAI_BASE_URL:-https://api.openai.com/v1}
- MODEL_NAME=${MODEL_NAME:-gpt-4o}
- REDIS_URL=redis://redis:6379/0
- OTEL_SERVICE_NAME=smart-cs-python
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4317
depends_on:
redis:
condition: service_healthy
# Java实现
java-agent:
build:
context: ./java-impl
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- REDIS_HOST=redis
- REDIS_PORT=6379
depends_on:
redis:
condition: service_healthy
# Go实现
go-agent:
build:
context: ./go-impl
dockerfile: Dockerfile
ports:
- "8090:8090"
environment:
- REDIS_URL=redis://redis:6379/0
- PORT=8090
depends_on:
redis:
condition: service_healthy
# Jaeger - 全链路追踪可视化 (可选)
jaeger:
image: jaegertracing/all-in-one:1.62
ports:
- "16686:16686" # Jaeger UI
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
environment:
- COLLECTOR_OTLP_ENABLED=true
volumes:
redis_data: