-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
executable file
·264 lines (240 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
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
263
264
version: "3"
networks:
kong-net:
driver: bridge
services:
mysqldb:
networks:
- kong-net
image: mysql
environment:
MYSQL_DATABASE: app_company_search
MYSQL_ROOT_PASSWORD: admin
ports:
- "3306:3306"
volumes:
- /usr/apps/allvolumes/mysqldb:/var/lib/mysql
restart: always
#network_mode: host
redis:
networks:
- kong-net
image: redis
ports:
- "6379:6379"
restart: always
#network_mode: host
memcached:
networks:
- kong-net
image: memcached
ports:
- "11211:11211"
restart: always
#network_mode: host
neo4jdb:
networks:
- kong-net
image: neo4j
volumes:
- /usr/apps/allvolumes/neo4j/data:/data
ports:
- "7474:7474"
- "7687:7687"
restart: always
#network_mode: host
elasticsearch:
networks:
- kong-net
image: elasticsearch:7.13.2
container_name: elasticsearch
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.type=single-node"
volumes:
- /usr/apps/allvolumes/elasticsearch/data:/usr/share/elasticsearch/data
#- /usr/apps/allvolumes/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
ports:
- 9200:9200
- 9300:9300
restart: always
#network_mode: host
kibana:
networks:
- kong-net
image: kibana:7.13.2
container_name: kibana
ports:
- 5601:5601
depends_on:
- elasticsearch
restart: always
#network_mode: host
elasticsearch-head:
networks:
- kong-net
container_name: elasticsearch-head
image: mobz/elasticsearch-head:5
ports:
- 9100:9100
depends_on:
- elasticsearch
restart: always
#network_mode: host
#######################################
# Kong api getway
#######################################
kong-database:
container_name: kong-database
image: postgres:9.6
restart: always
networks:
- kong-net
#network_mode: host
environment:
POSTGRES_USER: kong
POSTGRES_DB: kong
POSTGRES_PASSWORD: kong
ports:
- "5432:5432"
volumes:
- /usr/apps/allvolumes/postgresql/data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "kong"]
interval: 5s
timeout: 5s
retries: 5
#######################################
# Kong database migration
#######################################
kong-migration:
#network_mode: bridge
image: kong:latest
container_name: kong-migration
command: "kong migrations bootstrap"
networks:
- kong-net
#network_mode: host
restart: on-failure
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: kong-database
KONG_PG_DATABASE: kong
KONG_PG_USER: kong
KONG_PG_PASSWORD: kong
KONG_CASSANDRA_CONTACT_POINTS: kong-database
links:
- kong-database
depends_on:
- kong-database
#######################################
# Kong: The API Gateway
#######################################
kong:
#network_mode: bridge
container_name: kong
image: kong:latest
restart: always
networks:
- kong-net
#network_mode: host
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: kong-database
KONG_PROXY_LISTEN: 0.0.0.0:8000
KONG_PROXY_LISTEN_SSL: 0.0.0.0:8443
KONG_ADMIN_LISTEN: 0.0.0.0:8001
KONG_PG_USER: kong
KONG_PG_PASSWORD: kong
KONG_CASSANDRA_CONTACT_POINTS: kong-database
depends_on:
- kong-migration
- kong-database
healthcheck:
test: ["CMD", "curl", "-f", "http://kong:8001"]
interval: 5s
timeout: 2s
retries: 15
ports:
- "8001:8001"
- "8000:8000"
- "8443:8443"
#######################################
# Konga database prepare
#######################################
konga-prepare:
#network_mode: bridge
image: pantsel/konga:latest
container_name: konga-prepare
command: "-c prepare -a postgres -u postgresql://kong:kong@kong-database:5432/konga_db"
networks:
- kong-net
#network_mode: host
restart: on-failure
links:
- kong-database
depends_on:
- kong-database
#######################################
# Konga: Kong GUI
#######################################
konga:
#network_mode: bridge
image: pantsel/konga:latest
container_name: konga
restart: always
networks:
- kong-net
#network_mode: host
environment:
DB_ADAPTER: postgres
DB_HOST: kong-database
DB_USER: kong
#TOKEN_SECRET: km1GUr4RkcQD7DewhJPNXrCuZwcKmqjb
DB_URI: postgresql://kong:kong@kong-database:5432/konga_db
#DB_DATABASE: konga_db
NODE_ENV: production
depends_on:
- kong-database
ports:
- "1337:1337"
es_web:
container_name: web_es
build: /usr/apps/zhongtong_test/esserver
ports:
- "5100:5100"
volumes:
- /usr/apps/allvolumes/esserver:/esserver
- /usr/apps/allvolumes/esserver/tmp/logs:/esserver/tmp
command: bash start.sh
links:
- redis
- memcached
restart: always
tty: true
networks:
- kong-net
mysql_web:
container_name: web_mysql
build: /usr/apps/zhongtong_test/mysqlserver
ports:
- "5102:5102"
volumes:
- /usr/apps/allvolumes/mysqlserver:/mysqlserver
- /usr/apps/allvolumes/mysqlserver/tmp/logs:/tmp
command: bash start.sh
links:
- redis
- memcached
- mysqldb
restart: always
tty: true
networks:
- kong-net
#所有服务
#networks:
# zhongtong_net:
# driver: bridge
# ipam:
# config:
# - subnet: 172.19.0.0/16