-
Notifications
You must be signed in to change notification settings - Fork 332
/
docker-compose.yml
181 lines (181 loc) · 4.92 KB
/
docker-compose.yml
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
services:
mongodb:
image: mongo:6.0.6
container_name: 'mongo'
restart: always
ports:
- 27017:27017
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.runCommand('ping').ok"]
interval: 30s
timeout: 10s
retries: 5
networks:
- backend_services
rabbitmq:
image: rabbitmq:3.13.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
volumes:
- ./rabbitmq_enabled_plugins:/etc/rabbitmq/enabled_plugins
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
- ORDER_QUEUE_RECONNECT_LIMIT=3
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://mongodb:27017
- ORDER_DB_NAME=orderdb
- ORDER_DB_COLLECTION_NAME=orders
networks:
- backend_services
depends_on:
rabbitmq:
condition: service_healthy
mongodb:
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
environment:
- VUE_APP_PRODUCT_SERVICE_URL=http://product-service:3002/
- VUE_APP_ORDER_SERVICE_URL=http://order-service:3000/
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
environment:
- VUE_APP_PRODUCT_SERVICE_URL=http://product-service:3002/
- VUE_APP_MAKELINE_SERVICE_URL=http://makeline-service:3001/
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=500
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=400
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 # set to False if you are not using Azure OpenAI
- AZURE_OPENAI_DEPLOYMENT_NAME= # required if using Azure OpenAI
- AZURE_OPENAI_ENDPOINT= # required if using Azure OpenAI
- OPENAI_API_KEY= # required if using OpenAI and not required if using Azure OpenAI with Azure AD
- OPENAI_ORG_ID= # required if using OpenAI
networks:
- backend_services
networks:
backend_services:
driver: bridge