-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
237 lines (218 loc) · 5.04 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
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
version: '3.4'
services:
consul:
image: consul
container_name: consul_server
restart: always
ports:
- 8300:8300
- 8301:8301
- 8302:8302
- 8400:8400
- 8500:8500
- 53:53
- 8600:8600
redis:
image: redis
container_name: redis
restart: always
ports:
- 6380:6379
command: redis-server --requirepass 123456
volumes:
- ./redis-data:/data
rabbitmq:
image: rabbitmq:management
container_name: Rabbitmq
restart: always
ports:
- 15672:15672
- 5672:5672
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=123456
- TZ=Asia/Shanghai
mysql:
image: mysql:latest
container_name: mysql
restart: always
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: ShopDB
TZ: Asia/Shanghai
ports:
- 3306:3306
volumes:
- ./mysql-data:/var/lib/mysql
shop.goods.service:
image: ${DOCKER_REGISTRY-}shopgoodsservice
container_name: Shop.Goods.Service
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Production
- TZ=Asia/Shanghai
ports:
- 5002:5002
build:
context: .
dockerfile: src/Shop.GoodsService/Dockerfile
depends_on:
- consul
- mysql
links:
- consul
- mysql
shop.identity.service:
image: ${DOCKER_REGISTRY-}shopidentityservice
container_name: Shop.Identity.Service
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Production
- TZ=Asia/Shanghai
build:
context: .
dockerfile: src/Shop.IdentityService/Dockerfile
depends_on:
- consul
- mysql
links:
- consul
- mysql
ports:
- 5003:5003
shop.basket.service:
image: ${DOCKER_REGISTRY-}shopbasketservice
container_name: Shop.Basket.Service
build:
context: .
dockerfile: src/Shop.BasketService/Dockerfile
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Production
- TZ=Asia/Shanghai
- uragano_server_addr={LOCALIP}
- uragano_server_port=5004
- uragano_server_weight=100
- uragano_service_id={LOCALIP}:{uragano_server_port}
- uragano_service_name=Shop.Basket
- uragano_consul_addr=http://consul:8500
- uragano_consul_token=5ece74af-19d1-0e61-b25c-b9665d29f50b
ports:
- 5004:5004
depends_on:
- consul
- redis
- rabbitmq
- mysql
links:
- consul
- redis
- rabbitmq
- mysql
shop.order.service:
image: ${DOCKER_REGISTRY-}shoporderservice
container_name: shop.order.service
build:
context: .
dockerfile: src/Shop.OrderService/Dockerfile
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Production
- TZ=Asia/Shanghai
ports:
- 5005:5005
depends_on:
- consul
- rabbitmq
- mysql
links:
- consul
- rabbitmq
- mysql
shop.gateway.web:
image: ${DOCKER_REGISTRY-}shopgatewayweb
container_name: Shop.Gateway.Web
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Production
- TZ=Asia/Shanghai
build:
context: .
dockerfile: src/Shop.Gateway.Web/Dockerfile
ports:
- 9001:80
depends_on:
- consul
- shop.gateway.goods
- shop.gateway.identity
- shop.gateway.basket
links:
- consul
- shop.gateway.goods
- shop.gateway.identity
- shop.gateway.basket
shop.gateway.goods:
image: ${DOCKER_REGISTRY-}shopgatewaygoods
container_name: Shop.Gateway.Goods
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Production
- TZ=Asia/Shanghai
build:
context: .
dockerfile: src/Shop.Gateway.Goods/Dockerfile
ports:
- 8002:80
depends_on:
- consul
links:
- consul
shop.gateway.identity:
image: ${DOCKER_REGISTRY-}shopgatewayidentity
container_name: Shop.Gateway.Identity
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Production
- TZ=Asia/Shanghai
build:
context: .
dockerfile: src/Shop.Gateway.Identity/Dockerfile
ports:
- 8003:80
depends_on:
- consul
links:
- consul
shop.gateway.basket:
image: ${DOCKER_REGISTRY-}shopgatewaybasket
container_name: Shop.Gateway.Basket
build:
context: .
dockerfile: src/Shop.Gateway.Basket/Dockerfile
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Production
- TZ=Asia/Shanghai
ports:
- 8004:80
depends_on:
- consul
links:
- consul
shop.gateway.order:
image: ${DOCKER_REGISTRY-}shopgatewayorder
container_name: Shop.Gateway.Order
build:
context: .
dockerfile: src/Shop.Gateway.Order/Dockerfile
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Production
- TZ=Asia/Shanghai
ports:
- 8005:80
depends_on:
- consul
links:
- consul