-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-microservices.yml
More file actions
101 lines (94 loc) · 2.47 KB
/
docker-compose-microservices.yml
File metadata and controls
101 lines (94 loc) · 2.47 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
92
93
94
95
96
97
98
99
100
101
version: '3.8'
services:
# 车辆服务(支持扩展)
vehicle-service:
build:
context: ./microservices/vehicle-service
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "3001:3001"
environment:
PORT: 3001
MONGODB_URI: mongodb://taxiadmin:taxi-password-2024@taxi-mongodb:27017/taxi-fleet?authSource=admin
REDIS_URL: redis://:taxi-redis-auth-token-2024@taxi-redis:6379
RABBITMQ_URL: amqp://admin:admin@taxi-rabbitmq:5672
depends_on:
- taxi-mongodb
- taxi-redis
- taxi-rabbitmq
networks:
- 63d30_taxi-network
# 预订服务
booking-service:
build:
context: ./microservices/booking-service
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "3002:3002"
environment:
PORT: 3002
MONGODB_URI: mongodb://taxiadmin:taxi-password-2024@taxi-mongodb:27017/taxi-fleet?authSource=admin
REDIS_URL: redis://:taxi-redis-auth-token-2024@taxi-redis:6379
RABBITMQ_URL: amqp://admin:admin@taxi-rabbitmq:5672
depends_on:
- taxi-mongodb
- taxi-redis
- taxi-rabbitmq
- vehicle-service
networks:
- 63d30_taxi-network
# 通知服务
notification-service:
build:
context: ./microservices/notification-service
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "3003:3003"
environment:
PORT: 3003
MONGODB_URI: mongodb://taxiadmin:taxi-password-2024@taxi-mongodb:27017/taxi-fleet?authSource=admin
REDIS_URL: redis://:taxi-redis-auth-token-2024@taxi-redis:6379
RABBITMQ_URL: amqp://admin:admin@taxi-rabbitmq:5672
depends_on:
- taxi-mongodb
- taxi-redis
- taxi-rabbitmq
- vehicle-service
- booking-service
networks:
- 63d30_taxi-network
# 数据采集服务
data-collection:
build:
context: ./data-collection
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "3000:3000"
environment:
NODE_RED_URL: http://taxi-node-red:1880
depends_on:
- taxi-node-red
networks:
- 63d30_taxi-network
# Node-RED数据处理
node-red:
build:
context: ./node-red-flows
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "1881:1881"
volumes:
- node_red_data:/data
- ./node-red-flows/flows.json:/data/flows.json
networks:
- 63d30_taxi-network
networks:
63d30_taxi-network:
external: true
volumes:
node_red_data: