-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
262 lines (248 loc) · 6.65 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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
version: '2'
services:
# Redis
mul-redis-6379:
image: redis
container_name: mul-redis
# 网络
networks:
mulberrydoc:
ipv4_address: 172.40.1.3
ports:
- "6379:6379"
volumes:
- E:\mulberrydoc_docker\data\redis:/data/db
# MongoDB
mul-mongodb-27017:
image: mongo
container_name: mul-mongodb
# 网络
networks:
mulberrydoc:
ipv4_address: 172.40.1.4
ports:
- "27017:27017"
volumes:
- E:\mulberrydoc_docker\data\mongo:/data/db
# MySQL
mul-mysql-3306:
image: mysql
container_name: mul-mysql
environment:
MYSQL_ROOT_PASSWORD: 123456
command:
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
--max_allowed_packet=128M;
# 网络
networks:
mulberrydoc:
ipv4_address: 172.40.1.5
ports:
- "3306:3306"
volumes:
- E:\mulberrydoc_docker\data\mysql\db:/var/lib/mysql # mysql数据库挂载到宿主机
- E:\mulberrydoc_docker\data\mysql\conf:/etc/mysql/conf.d # 容器的配置目录挂载到宿主机
# 注册中心 1
mul-eureka-9001:
# 镜像
image: mulberrydoc/mul-eureka:v1.2.0
# 容器名称
container_name: mul-eureka-9001
# 环境变量
environment:
MUL_NAME: mul-eureka
MUL_PORT: 9001
MUL_DEFAULTZONE: http://172.40.1.2:9002/eureka
MUL_ROOT: /
# 网络
networks:
mulberrydoc:
ipv4_address: 172.40.1.1
# 暴露端口
ports:
- "9001:9001"
# 挂载点
volumes:
- E:\mulberrydoc_docker\mul-eureka\config\application.yml:/application.yml
- E:\mulberrydoc_docker\mul-eureka\logs\mul-eureka_9001:/logs/mul-eureka_9001
# 注册中心 2
mul-eureka-9002:
# 镜像
image: mulberrydoc/mul-eureka:v1.2.0
# 容器名称
container_name: mul-eureka-9002
# 环境变量
environment:
MUL_NAME: mul-eureka
MUL_PORT: 9002
MUL_DEFAULTZONE: http://172.40.1.1:9001/eureka
MUL_ROOT: /
# 网络
networks:
mulberrydoc:
ipv4_address: 172.40.1.2
# 暴露端口
ports:
- "9002:9002"
# 挂载点
volumes:
- E:\mulberrydoc_docker\mul-eureka\config\application.yml:/application.yml
- E:\mulberrydoc_docker\mul-eureka\logs\mul-eureka_9002:/logs/mul-eureka_9002
# 服务提供者 Service-Auth 1
mul-service-auth-7001:
# 镜像
image: mulberrydoc/mul-service-auth:v1.0.1
# 容器名称
container_name: mul-service-auth-7001
# 环境变量
environment:
MUL_NAME: mul-service-auth
MUL_PORT: 7001
MUL_DEFAULTZONE: http://172.40.1.1:9001/eureka,http://172.40.1.2:9002/eureka
MUL_ROOT: /
# 网络
networks:
mulberrydoc:
ipv4_address: 172.40.1.11
# 暴露端口
ports:
- "7001:7001"
# 挂载点
volumes:
- E:\mulberrydoc_docker\mul-service-auth\config\application.yml:/application.yml
- E:\mulberrydoc_docker\mul-service-auth\logs\mul-service-auth_7001:/logs/mul-service-auth_7001
# 服务提供者 Service-Documents 1
mul-service-documents-7003:
# 镜像
image: mulberrydoc/mul-service-documents:v1.0.1
# 容器名称
container_name: mul-service-documents-7003
# 环境变量
environment:
MUL_NAME: mul-service-documents
MUL_PORT: 7003
MUL_DEFAULTZONE: http://172.40.1.1:9001/eureka,http://172.40.1.2:9002/eureka
MUL_ROOT: /
# 网络
networks:
mulberrydoc:
ipv4_address: 172.40.1.13
# 暴露端口
ports:
- "7003:7003"
# 挂载点
volumes:
- E:\mulberrydoc_docker\mul-service-documents\config\application.yml:/application.yml
- E:\mulberrydoc_docker\mul-service-documents\logs\mul-service-documents_7003:/logs/mul-service-documents_7003
# 服务消费者 Consumer 1
mul-consumer-11001:
# 镜像
image: mulberrydoc/mul-consumer:v1.0.1
# 容器名称
container_name: mul-consumer-11001
# 环境变量
environment:
MUL_NAME: mul-consumer
MUL_PORT: 11001
MUL_DEFAULTZONE: http://172.40.1.1:9001/eureka,http://172.40.1.2:9002/eureka
MUL_ROOT: /
# 网络
networks:
mulberrydoc:
ipv4_address: 172.40.1.21
# 暴露端口
ports:
- "11001:11001"
# 挂载点
volumes:
- E:\mulberrydoc_docker\mul-consumer\config\application.yml:/application.yml
- E:\mulberrydoc_docker\mul-consumer\logs\mul-consumer_11001:/logs/mul-consumer_11001
# 内部网关 Gateway
mul-gateway-12000:
# 镜像
image: mulberrydoc/mul-gateway:v1.2.0
# 容器名称
container_name: mul-gateway-12000
# 环境变量
environment:
MUL_NAME: mul-gateway
MUL_PORT: 12000
MUL_DEFAULTZONE: http://172.40.1.1:9001/eureka,http://172.40.1.2:9002/eureka
MUL_ROOT: /
# 网络
networks:
mulberrydoc:
ipv4_address: 172.40.1.30
# 暴露端口
ports:
- "12000:12000"
# 挂载点
volumes:
- E:\mulberrydoc_docker\mul-gateway\config\application.yml:/application.yml
- E:\mulberrydoc_docker\mul-gateway\logs\mul-gateway_12000:/logs/mul-gateway_12000
# 文档服务器 ShareDB
mul-sharedb-9003:
# 镜像
image: mulberrydoc/mul-sharedb:v1.0.0
# 容器名称
container_name: mul-sharedb-9003
# 网络
networks:
mulberrydoc:
ipv4_address: 172.40.1.40
# 暴露端口
ports:
- "9003:9003"
# 挂载点
volumes:
- E:\mulberrydoc_docker\mul-sharedb\config\default.js:/mul-sharedb/config/default.js
command: "npm run serve"
# 通信服务器 Connection
mul-connection-9100:
# 镜像
image: mulberrydoc/mul-connection:v1.0.1
# 容器名称
container_name: mul-connection-9100
# 网络
networks:
mulberrydoc:
ipv4_address: 172.40.1.41
# 暴露端口
ports:
- "9100:9100"
command: "npm run serve"
# 前端服务器 Web
mul-web-8081:
# 镜像
image: mulberrydoc/mul-web:v0.1.4
# 容器名称
container_name: mul-web-8081
# 网络
networks:
mulberrydoc:
ipv4_address: 172.40.1.42
# 暴露端口
ports:
- "8081:8081"
mul-nginx-8080:
image: nginx
container_name: mul-nginx-8080
# 网络
networks:
mulberrydoc:
ipv4_address: 172.40.1.50
ports:
- "8080:8080"
# 挂载点
volumes:
- E:\mulberrydoc_docker\mul-nginx\default.conf:/etc/nginx/conf.d/default.conf
networks:
mulberrydoc:
ipam:
config:
- subnet: 172.40.1.0/24
gateway: 172.40.1.254