-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (34 loc) · 1.19 KB
/
docker-compose.yml
File metadata and controls
35 lines (34 loc) · 1.19 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
version: '3'
services:
microservice-discovery-eureka:
image: itmuch/microservice-discovery-eureka:0.0.1-SNAPSHOT
network_mode: host
ports:
- 8761:8761
microservice-provider-user:
image: itmuch/microservice-provider-user:0.0.1-SNAPSHOT
network_mode: host
ports:
- 8000:8000
microservice-consumer-movie-ribbon-hystrix:
image: itmuch/microservice-consumer-movie-ribbon-hystrix:0.0.1-SNAPSHOT
network_mode: host
ports:
- 8010:8010
microservice-hystrix-dashboard:
image: itmuch/microservice-hystrix-dashboard:0.0.1-SNAPSHOT
network_mode: host
ports:
- 8030:8030
microservice-hystrix-turbine:
image: itmuch/microservice-hystrix-turbine:0.0.1-SNAPSHOT
network_mode: host
ports:
- 8031:8031
microservice-gateway-zuul:
image: itmuch/microservice-gateway-zuul:0.0.1-SNAPSHOT
network_mode: host
ports:
- 8040:8040
## 注1:本Compose文件使用的网络模式是host,使用这种模式,可以让所有的微服务都无需修改eureka.client.serviceUrl.defautlZone的配置,而直接使用http://localhost:8761/eureka/。
## 注2:该方式一般不适合生产,实体书里也并未提及,仅作拓展阅读。