-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (83 loc) · 1.75 KB
/
docker-compose.yml
File metadata and controls
91 lines (83 loc) · 1.75 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
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
version: "3.8"
services:
# 底层服务 - FreshService
fresh-service:
build: .
command: python services/fresh_service.py
ports:
- "50053:50053"
environment:
- PYTHONPATH=/app
networks:
- warehouse-network
# 底层服务 - ApplianceService
appliance-service:
build: .
command: python services/appliance_service.py
ports:
- "50054:50054"
environment:
- PYTHONPATH=/app
networks:
- warehouse-network
# 中层服务 - FoodService
food-service:
build: .
command: python services/food_service.py
ports:
- "50052:50052"
environment:
- PYTHONPATH=/app
depends_on:
- fresh-service
networks:
- warehouse-network
# 中层服务 - ElectronicsService
electronics-service:
build: .
command: python services/electronics_service.py
ports:
- "50051:50051"
environment:
- PYTHONPATH=/app
depends_on:
- appliance-service
networks:
- warehouse-network
# 日志服务 - LoggerService
logger-service:
build: .
command: python logger_service.py
ports:
- "50055:50055"
environment:
- PYTHONPATH=/app
networks:
- warehouse-network
# 顶层服务 - API Gateway
api-gateway:
build: .
command: python api_gateway.py
ports:
- "50050:50050"
environment:
- PYTHONPATH=/app
depends_on:
- food-service
- electronics-service
- logger-service
networks:
- warehouse-network
# 测试客户端
test-client:
build: .
command: python test_client.py
environment:
- PYTHONPATH=/app
depends_on:
- api-gateway
networks:
- warehouse-network
networks:
warehouse-network:
driver: bridge