forked from colinbut/sales-order-system-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
105 lines (97 loc) · 1.99 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
version: "3"
services:
user-service:
build: ./user-service
container_name: user-service
expose:
- "8080"
ports:
- "8080:8080"
networks:
- sales-order-system
customer-service:
build: ./customer-service
container_name: customer-service
expose:
- "8081"
env_file:
- '.env'
ports:
- "8081:8081"
depends_on:
- 'customer-db-mysql'
networks:
- sales-order-system
customer-db-mysql:
image: mysql:8
container_name: customer-service-mysql
ports:
- "3306:3306"
networks:
- sales-order-system
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=customerdb
order-service:
build: ./order-service
container_name: order-service
expose:
- "8082"
ports:
- "8082:8082"
env_file:
- '.env'
depends_on:
- 'order-service-db-mongodb'
networks:
- sales-order-system
order-service-db-mongodb:
image: mongo
container_name: order-service-mongodb
ports:
- "27017:27017"
networks:
- sales-order-system
product-service:
build: ./product-service
container_name: product-service
expose:
- "8083"
env_file:
- '.env'
ports:
- "8083:8083"
depends_on:
- 'product-service-db-redis'
networks:
- sales-order-system
product-service-db-redis:
image: redis
container_name: product-service-redis
command: [ "redis-server", "--protected-mode", "no" ]
ports:
- "6379:6379"
networks:
- sales-order-system
sales-order-system-client:
build: ./sales-order-system
container_name: sales-order-system-app
expose:
- "80"
ports:
- "80:80"
networks:
- sales-order-system
depends_on:
- 'user-service'
- 'customer-service'
- 'order-service'
- 'product-service'
links:
- user-service
- customer-service
- order-service
- product-service
networks:
sales-order-system:
external: false