-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathdocker-compose.yaml
156 lines (146 loc) · 3.49 KB
/
docker-compose.yaml
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
services:
redis:
image: redis:latest
ports:
- "6379:6379"
command: redis-server --appendonly no
networks:
- app-network
minio:
image: minio/minio:latest
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./data/minio:/data
command: minio server /data --console-address ":9001"
networks:
- app-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 5
api-service:
build:
context: .
dockerfile: services/APIService/Dockerfile
ports:
- "8002:8002"
environment:
- PDF_SERVICE_URL=http://pdf-service:8003
- AGENT_SERVICE_URL=http://agent-service:8964
- TTS_SERVICE_URL=http://tts-service:8889
- REDIS_URL=redis://redis:6379
depends_on:
- redis
- pdf-service
- agent-service
- tts-service
- jaeger
networks:
- app-network
agent-service:
build:
context: .
dockerfile: services/AgentService/Dockerfile
ports:
- "8964:8964"
environment:
- NVIDIA_API_KEY=${NVIDIA_API_KEY}
- REDIS_URL=redis://redis:6379
- MODEL_CONFIG_PATH=/app/config/models.json
volumes:
- ./models.json:/app/config/models.json
depends_on:
- redis
networks:
- app-network
pdf-service:
build:
context: .
dockerfile: services/PDFService/Dockerfile
ports:
- "8003:8003"
environment:
- REDIS_URL=redis://redis:6379
- MODEL_API_URL=${MODEL_API_URL:-http://pdf-api:8004}
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- redis
networks:
- app-network
tts-service:
build:
context: .
dockerfile: services/TTSService/Dockerfile
ports:
- "8889:8889"
environment:
- MAX_CONCURRENT_REQUESTS=${MAX_CONCURRENT_REQUESTS}
- ELEVENLABS_API_KEY=${ELEVENLABS_API_KEY}
- REDIS_URL=redis://redis:6379
depends_on:
- redis
networks:
- app-network
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686" # UI
- "4317:4317" # OTLP GRPC
- "4318:4318" # OTLP HTTP
environment:
- COLLECTOR_OTLP_ENABLED=true
healthcheck:
test: ["CMD", "wget", "--spider", "localhost:16686"]
interval: 5s
timeout: 3s
retries: 3
networks:
- app-network
pdf-api:
build:
context: services/PDFService/PDFModelService
dockerfile: Dockerfile.api
ports:
- "8004:8004"
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- REDIS_HOST=redis
- REDIS_PORT=6379
- TEMP_FILE_DIR=/tmp/pdf_conversions
volumes:
- pdf_temp:/tmp/pdf_conversions
depends_on:
- redis
- celery-worker
restart: unless-stopped
networks:
- app-network
celery-worker:
build:
context: services/PDFService/PDFModelService
dockerfile: Dockerfile.worker
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- TEMP_FILE_DIR=/tmp/pdf_conversions
volumes:
- pdf_temp:/tmp/pdf_conversions
depends_on:
- redis
restart: unless-stopped
networks:
- app-network
volumes:
redis_data:
pdf_temp:
networks:
app-network:
driver: bridge