-
Notifications
You must be signed in to change notification settings - Fork 789
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
212 lines (212 loc) · 5.28 KB
/
Copy pathdocker-compose.yml
File metadata and controls
212 lines (212 loc) · 5.28 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
services:
documentdb:
image: ghcr.io/documentdb/documentdb/documentdb-local:pg17-0.112.0
container_name: documentdb
restart: always
ports:
- 10260:10260
command: ["--username", "username", "--password", "password"]
healthcheck:
test: ["CMD-SHELL", "echo | openssl s_client -connect localhost:10260 -brief 2>/dev/null | grep -q CONNECTED"]
interval: 30s
timeout: 10s
retries: 5
networks:
- backend_services
rabbitmq:
image: rabbitmq:4.3.2-management-alpine
container_name: rabbitmq
restart: always
environment:
- "RABBITMQ_DEFAULT_USER=username"
- "RABBITMQ_DEFAULT_PASS=password"
ports:
- 15672:15672
- 5672:5672
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 30s
timeout: 10s
retries: 5
networks:
- backend_services
order-service:
build: src/order-service
container_name: order-service
restart: always
ports:
- 3000:3000
healthcheck:
test:
[
"CMD",
"wget",
"-O",
"/dev/null",
"-q",
"http://order-service:3000/health",
]
interval: 30s
timeout: 10s
retries: 5
environment:
- ORDER_QUEUE_HOSTNAME=rabbitmq
- ORDER_QUEUE_PORT=5672
- ORDER_QUEUE_USERNAME=username
- ORDER_QUEUE_PASSWORD=password
- ORDER_QUEUE_NAME=orders
networks:
- backend_services
depends_on:
rabbitmq:
condition: service_healthy
makeline-service:
build: src/makeline-service
container_name: makeline-service
restart: always
ports:
- 3001:3001
healthcheck:
test:
[
"CMD",
"wget",
"-O",
"/dev/null",
"-q",
"http://makeline-service:3001/health",
]
interval: 30s
timeout: 10s
retries: 5
environment:
- ORDER_QUEUE_URI=amqp://rabbitmq:5672
- ORDER_QUEUE_USERNAME=username
- ORDER_QUEUE_PASSWORD=password
- ORDER_QUEUE_NAME=orders
- ORDER_DB_URI=mongodb://documentdb:10260/?tls=true&tlsAllowInvalidCertificates=true
- ORDER_DB_NAME=orderdb
- ORDER_DB_COLLECTION_NAME=orders
- ORDER_DB_USERNAME=username
- ORDER_DB_PASSWORD=password
networks:
- backend_services
depends_on:
rabbitmq:
condition: service_healthy
documentdb:
condition: service_healthy
product-service:
build: src/product-service
container_name: product-service
restart: always
ports:
- 3002:3002
healthcheck:
test:
[
"CMD",
"wget",
"-O",
"/dev/null",
"-q",
"http://product-service:3002/health",
]
interval: 30s
timeout: 10s
retries: 5
environment:
- AI_SERVICE_URL=http://ai-service:5001/
networks:
- backend_services
store-front:
build: src/store-front
container_name: store-front
restart: always
ports:
- 8080:8080
healthcheck:
test:
["CMD", "wget", "-O", "/dev/null", "-q", "http://store-front:80/health"]
interval: 30s
timeout: 10s
retries: 5
networks:
- backend_services
depends_on:
- product-service
- order-service
store-admin:
build: src/store-admin
container_name: store-admin
restart: always
ports:
- 8081:8081
healthcheck:
test:
["CMD", "wget", "-O", "/dev/null", "-q", "http://store-admin:80/health"]
interval: 30s
timeout: 10s
retries: 5
networks:
- backend_services
depends_on:
- product-service
- makeline-service
virtual-customer:
build: src/virtual-customer
container_name: virtual-customer
restart: always
environment:
- ORDER_SERVICE_URL=http://order-service:3000/
- ORDERS_PER_HOUR=30
networks:
- backend_services
depends_on:
order-service:
condition: service_healthy
virtual-worker:
build: src/virtual-worker
container_name: virtual-worker
restart: always
environment:
- MAKELINE_SERVICE_URL=http://makeline-service:3001
- ORDERS_PER_HOUR=20
networks:
- backend_services
depends_on:
makeline-service:
condition: service_healthy
ai-service:
build: src/ai-service
container_name: ai-service
restart: always
ports:
- 5001:5001
healthcheck:
test:
[
"CMD",
"wget",
"-O",
"/dev/null",
"-q",
"http://ai-service:5001/health",
]
interval: 30s
timeout: 10s
retries: 5
environment:
- USE_AZURE_OPENAI=True
- AZURE_OPENAI_API_VERSION=2024-12-01-preview
- AZURE_OPENAI_DEPLOYMENT_NAME= # required if using Azure OpenAI
- AZURE_OPENAI_ENDPOINT= # required if using Azure OpenAI
- AZURE_OPENAI_API_KEY= # required if using Azure OpenAI key auth (not needed with workload identity)
- AZURE_OPENAI_IMAGE_API_VERSION=2025-04-01-preview
- AZURE_OPENAI_IMAGE_DEPLOYMENT_NAME= # required for image generation
- AZURE_OPENAI_IMAGE_ENDPOINT= # optional override; defaults to AZURE_OPENAI_ENDPOINT
networks:
- backend_services
networks:
backend_services:
driver: bridge