forked from apache/shenyu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
127 lines (124 loc) · 3.57 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
# 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: "3.9"
services:
shenyu-mysql:
restart: always
image: mysql:5.7
container_name: shenyu-mysql
ports:
- 13310:3306
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=shenyu
networks:
- shenyu
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 2s
retries: 30
shenyu-zk:
container_name: shenyu-zk
image: zookeeper:3.5
restart: always
networks:
- shenyu
shenyu-redis:
image: redis:6.0-alpine
container_name: shenyu-redis
restart: always
command: redis-server --requirepass abc
networks:
- shenyu
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
shenyu-examples-http:
deploy:
resources:
limits:
memory: 2048M
container_name: shenyu-examples-http
image: shenyu-examples-http:latest
restart: always
environment:
- shenyu.client.serverLists=http://shenyu-admin:9095
healthcheck:
test: [ "CMD", "wget", "http://shenyu-examples-http:8189/test/path/123?name=tom" ]
timeout: 2s
retries: 30
ports:
- 8189:8189
depends_on:
shenyu-admin:
condition: service_healthy
networks:
- shenyu
shenyu-admin:
image: apache/shenyu-admin:2.4.0-SNAPSHOT
container_name: shenyu-admin
restart: always
networks:
- shenyu
volumes:
- type: bind
source: ./admin-config/
target: /opt/sql/
depends_on:
shenyu-mysql:
condition: service_healthy
shenyu-redis:
condition: service_healthy
ports:
- 9095:9095
environment:
- SPRING_PROFILES_ACTIVE=mysql
- "spring.datasource.url=jdbc:mysql://shenyu-mysql:3306/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false"
- "spring.datasource.password=root"
- "shenyu.database.init_script=META-INF/schema.sql;file:/opt/sql/schema.sql"
healthcheck:
test: [ "CMD", "wget", "http://shenyu-admin:9095/actuator/health" ]
timeout: 2s
retries: 30
# from http plugin dockerfile
shenyu-integrated-test-http:
container_name: shenyu-integrated-test-http
image: apache/shenyu-integrated-test-http:latest
# image: apache/shenyu-bootstrap:2.4.0-SNAPSHOT
restart: always
deploy:
resources:
limits:
memory: 2048M
depends_on:
shenyu-examples-http:
condition: service_healthy
ports:
- 9195:9195
healthcheck:
test: [ "CMD", "wget", "http://shenyu-integrated-test-http:9195/http/test/path/123?name=Tom" ]
timeout: 2s
retries: 30
networks:
- shenyu
health-checker:
container_name: health-checker
image: hello-world
depends_on:
shenyu-integrated-test-http:
condition: service_healthy
networks:
shenyu:
name: shenyu