forked from apache/shenyu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.mysql.yml
122 lines (115 loc) · 3.53 KB
/
docker-compose.mysql.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
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
version: '2.3'
services:
zookeeper:
image: zookeeper:3.5
restart: always
expose:
- 2181
nacos:
image: nacos/nacos-server:v2.2.3
environment:
- TZ=Asia/Shanghai
- MODE=standalone
expose:
- 8848
- 9848
- 9849
ports:
- "8848:8848"
- "9848:9848"
- "9849:9849"
admin:
image: shenyu/admin:latest
expose:
- 9095
ports:
- "9095:9095"
environment:
- SPRING_PROFILES_ACTIVE=mysql
- spring.datasource.username=shenyue2e
- spring.datasource.password=123456
- spring.datasource.url=jdbc:mysql://mysql:3306/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
healthcheck:
test: [ "CMD-SHELL", "wget -q -O - http://admin:9095/actuator/health | grep UP || exit 1" ]
timeout: 2s
retries: 3
start_period: 5s
depends_on:
springcloud:
condition: service_healthy
volumes:
- ../../target/test-classes/admin-application.yml:/opt/shenyu-admin/conf/application.yml
- /tmp/shenyu-e2e/mysql/mysql-connector.jar:/opt/shenyu-admin/ext-lib/mysql-connector.jar
eureka:
image: shenyu-examples-eureka:latest
restart: always
expose:
- 8761
ports:
- "8761:8761"
healthcheck:
test: [ "CMD-SHELL", "wget -q -O - http://eureka:8761/actuator/health | grep UP || exit 1" ]
timeout: 2s
retries: 3
start_period: 5s
springcloud:
image: shenyu-examples-springcloud:latest
restart: always
environment:
- shenyu.register.serverLists=http://admin:9095
- eureka.client.serviceUrl.defaultZone=http://eureka:8761/eureka/
expose:
- 8884
ports:
- "8884:8884"
depends_on:
eureka:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "wget -q -O - http://springcloud:8884/actuator/health | grep UP || exit 1" ]
timeout: 2s
retries: 5
start_period: 8s
gateway:
image: shenyu/bootstrap:latest
environment:
- eureka.client.serviceUrl.defaultZone=http://eureka:8761/eureka/
expose:
- 9195
ports:
- "9195:9195"
depends_on:
admin:
condition: service_healthy
volumes:
- ../../target/test-classes/bootstrap-application.yml:/opt/shenyu-bootstrap/conf/application.yml
mysql:
image: mysql:8
environment:
- MYSQL_ROOT_PASSWORD=123123
- MYSQL_USER=shenyue2e
- MYSQL_PASSWORD=123456
healthcheck:
test: "/usr/bin/mysql --user=root --password=123123 --execute \"SHOW DATABASES;\""
interval: 2s
timeout: 20s
retries: 10
volumes:
- /tmp/shenyu-e2e/mysql/schema.sql:/docker-entrypoint-initdb.d/schema.sql