-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yml
234 lines (232 loc) · 5.73 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
version: "3"
services:
nacos:
build:
context: .
dockerfile: ./Dockerfile-nacos
container_name: nacos
ports:
- "8848:8848"
restart: always
entrypoint: ./wait-for-it.sh mysql:3306 -t 0 -- bin/docker-startup.sh
depends_on:
- mysql
environment:
- PREFER_HOST_MODE=hostname
- MODE=standalone
- SPRING_DATASOURCE_PLATFORM=mysql
- MYSQL_SERVICE_HOST=mysql
- MYSQL_SERVICE_PORT=3306
- MYSQL_SERVICE_DB_NAME=nacos_config
- MYSQL_SERVICE_USER=root
- MYSQL_SERVICE_PASSWORD=root
- MYSQL_SERVICE_DB_PARAM=characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false&serverTimezone=Japan
networks:
- online-education
seata:
image: seataio/seata-server:1.3.0
container_name: seata
hostname: seata-server
restart: always
depends_on:
- mysql
- nacos
ports:
- "8091:8091"
environment:
- SEATA_PORT=8091
- STORE_MODE=file
- SEATA_CONFIG_NAME=file:/root/seata-config/registry
volumes:
- ./doc/seata/config:/root/seata-config
networks:
- online-education
mysql:
image: mysql:8.0.22
restart: always
container_name: mysql
ports:
- "3307:3306"
command: --default-authentication-plugin=mysql_native_password
volumes:
- ./doc/sql:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: "root"
networks:
- online-education
sentinel:
image: bladex/sentinel-dashboard:latest
restart: on-failure:3
container_name: sentinel_dashboard
ports:
- "8858:8858"
networks:
- online-education
rabbitmq:
image: rabbitmq:3.8.19-management
hostname: rabbitmq
container_name: rabbitmq
ports:
- "5672:5672"
- "15672:15672"
environment:
- RABBITMQ_DEFAULT_USER=andochiwa
- RABBITMQ_DEFAULT_PASS=123789
networks:
- online-education
redis:
image: redis:6.2.4
container_name: redis
ports:
- "6379:6379"
networks:
- online-education
api_gateway:
build:
context: .
dockerfile: ./infrastructure/api_gateway80/Dockerfile
container_name: api_gateway80
command: ./wait-for-it.sh nacos:8848 -t 0 -- java -jar api_gateway.jar
depends_on:
- mysql
- nacos
restart: always
ports:
- "80:80"
networks:
- online-education
service_edu:
build:
context: .
dockerfile: ./service/service_edu8001/Dockerfile
container_name: service_edu8001
command: ./wait-for-it.sh nacos:8848 -t 0 -- ./wait-for-it.sh seata:8091 -t 0 -- java -jar service_edu.jar
depends_on:
- mysql
- nacos
- rabbitmq
- redis
- seata
restart: always
ports:
- "8001:8001"
networks:
- online-education
service_oss:
build:
context: .
dockerfile: ./service/service_oss8002/Dockerfile
container_name: service_oss8002
command: ./wait-for-it.sh nacos:8848 -t 0 -- ./wait-for-it.sh seata:8091 -t 0 -- java -jar service_oss.jar
depends_on:
- mysql
- nacos
- redis
- seata
restart: always
ports:
- "8002:8002"
networks:
- online-education
service_vod:
build:
context: .
dockerfile: ./service/service_vod8003/Dockerfile
container_name: service_vod8003
command: ./wait-for-it.sh nacos:8848 -t 0 -- ./wait-for-it.sh seata:8091 -t 0 -- java -jar service_vod.jar
depends_on:
- mysql
- nacos
- redis
- seata
- rabbitmq
restart: always
ports:
- "8003:8003"
networks:
- online-education
service_cms:
build:
context: .
dockerfile: ./service/service_cms8004/Dockerfile
container_name: service_cms8004
command: ./wait-for-it.sh nacos:8848 -t 0 -- ./wait-for-it.sh seata:8091 -t 0 -- java -jar service_cms.jar
depends_on:
- mysql
- nacos
- redis
- seata
restart: always
ports:
- "8004:8004"
networks:
- online-education
service_center:
build:
context: .
dockerfile: ./service/service_center8005/Dockerfile
container_name: service_center8005
command: ./wait-for-it.sh nacos:8848 -t 0 -- ./wait-for-it.sh seata:8091 -t 0 -- java -jar service_center.jar
depends_on:
- mysql
- nacos
- redis
- seata
- rabbitmq
restart: always
ports:
- "8005:8005"
networks:
- online-education
service_order:
build:
context: .
dockerfile: ./service/service_order8006/Dockerfile
container_name: service_order8006
command: ./wait-for-it.sh nacos:8848 -t 0 -- ./wait-for-it.sh seata:8091 -t 0 -- java -jar service_order.jar
depends_on:
- mysql
- nacos
- redis
- seata
- rabbitmq
restart: always
ports:
- "8006:8006"
networks:
- online-education
service_statistic:
build:
context: .
dockerfile: ./service/service_statistic8007/Dockerfile
container_name: service_statistic8007
command: ./wait-for-it.sh nacos:8848 -t 0 -- ./wait-for-it.sh seata:8091 -t 0 -- java -jar service_statictis.jar
depends_on:
- mysql
- nacos
- redis
- seata
- rabbitmq
restart: always
ports:
- "8007:8007"
networks:
- online-education
service_acl:
build:
context: .
dockerfile: ./service/service_acl8008/Dockerfile
container_name: service_acl8008
command: ./wait-for-it.sh nacos:8848 -t 0 -- ./wait-for-it.sh seata:8091 -t 0 -- java -jar service_acl.jar
depends_on:
- mysql
- nacos
- redis
- seata
restart: always
ports:
- "8008:8008"
networks:
- online-education
networks:
online-education: