-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
77 lines (71 loc) · 1.6 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
version: "3"
services:
product-service:
container_name: product-service
restart: always
build: product_service/
ports:
- "3000:3000"
volumes:
- ./product_service:/usr/src/product-service
- /usr/src/product-service/node_modules
depends_on:
- tay-mall-db
customer-service:
container_name: customer-service
restart: always
build: customer_service/
ports:
- "3001:3000"
volumes:
- ./customer_service:/usr/src/customer-service
- /usr/src/customer-service/node_modules
depends_on:
- tay-mall-db
payment-service:
container_name: payment-service
build: payment_service/
ports:
- "3002:3000"
volumes:
- ./payment_service:/usr/src/payment-service
- /usr/src/payment-service/node_modules
depends_on:
- tay-mall-db
- rabbitmq
links:
- tay-mall-db
- rabbitmq
restart: always
order-service:
container_name: order-service
restart: always
build: order_service/
ports:
- "3003:3000"
volumes:
- ./order_service:/usr/src/order-service
- /usr/src/order-service/node_modules
depends_on:
- tay-mall-db
- rabbitmq
tay-mall-db:
container_name: tay-mall-db
image: mongo
volumes:
- data:/data/db
ports:
- "27018:27017"
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: 'rabbitmq'
ports:
- 5673:5672
- 15672:15672
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:15672" ]
interval: 30s
timeout: 10s
retries: 5
volumes:
data: