-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
136 lines (129 loc) · 3.27 KB
/
docker-compose.yml
File metadata and controls
136 lines (129 loc) · 3.27 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
version: '3.8'
services:
# Asterisk telephony server
asterisk:
build:
context: ./asterisk
dockerfile: Dockerfile
container_name: asterisk-server
ports:
- "5060:5060/udp" # SIP signaling
- "10000-10100:10000-10100/udp" # RTP media
- "8088:8088/tcp" # ARI interface
volumes:
- ./asterisk/config:/etc/asterisk
- asterisk-sounds:/var/lib/asterisk/sounds
- asterisk-recordings:/var/lib/asterisk/recordings
- asterisk-logs:/var/log/asterisk
networks:
- voice-network
restart: unless-stopped
healthcheck:
test: ["CMD", "/usr/local/bin/health-check.sh"]
interval: 30s
timeout: 10s
start_period: 40s
retries: 3
# Redis for session state management
redis:
image: redis:7-alpine
container_name: redis-cache
ports:
- "6379:6379"
networks:
- voice-network
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
# Chatbot orchestrator service
orchestrator:
build:
context: ./orchestrator
dockerfile: Dockerfile
container_name: chatbot-orchestrator
ports:
- "8000:8000"
environment:
- REDIS_URL=redis://redis:6379
- ENGLISH_BOT_URL=http://english-bot:8001
- KINYARWANDA_BOT_URL=http://kinyarwanda-bot:8002
- ARI_URL=http://asterisk:8088/ari
- ARI_APP=chatbot-en
- ARI_USER=asterisk
- ARI_PASS=changeme
- RECORDINGS_PATH=/shared/recordings
- SOUNDS_PATH=/shared/sounds
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- SESSION_TIMEOUT=${SESSION_TIMEOUT:-300}
volumes:
- asterisk-recordings:/shared/recordings
- asterisk-sounds:/shared/sounds
depends_on:
- redis
- asterisk
- english-bot
networks:
- voice-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
# English voice chatbot service
english-bot:
build:
context: ./chatbots/english
dockerfile: Dockerfile
container_name: english-chatbot
ports:
- "8001:8001"
environment:
- MODEL_PATH=/app/models
- LOG_LEVEL=${LOG_LEVEL:-INFO}
volumes:
- english-bot-models:/app/models
networks:
- voice-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 30s
timeout: 10s
retries: 3
# Kinyarwanda voice chatbot service (placeholder)
kinyarwanda-bot:
build:
context: ./chatbots/kinyarwanda
dockerfile: Dockerfile
container_name: kinyarwanda-chatbot
ports:
- "8002:8002"
environment:
- MODEL_PATH=/models
- LOG_LEVEL=${LOG_LEVEL:-INFO}
volumes:
- ./chatbots/kinyarwanda/models:/models
networks:
- voice-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8002/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
voice-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
volumes:
redis-data:
asterisk-logs:
asterisk-recordings:
asterisk-sounds:
english-bot-models: