-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
390 lines (369 loc) · 9.66 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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
version: '3'
services:
redis:
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
environment:
- appendonly=yes
- TZ=Asia/Shanghai
- LANG=en_US.UTF-8
ports:
- "6379:6379"
volumes:
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf:rw
- ./redis/data:/data:rw
image: redis
container_name: redis
redisinsight:
image: 'redislabs/redisinsight:latest'
container_name: redisinsight
restart: always
ports:
- 8001:8001
volumes:
- ./redis/redisinsight/data:/db:rw
mysql:
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
environment:
MYSQL_ROOT_PASSWORD: 123456
security_opt:
- seccomp:unconfined
volumes:
- mysql_data:/var/lib/mysql
- ./mysql/my.cnf:/etc/my.cnf:ro
- ./mysql/log:/var/log/mysql
ports:
- "3306:3306"
image: mysql:latest
container_name: mysql
### PHP-FPM ##############################################
php82:
container_name: php82
image: wzc1411520/php
depends_on:
- redis
- mysql
links:
- redis
- mysql
- # volumes:
# - ../applications:/server:rw
# - ./php74/php7.4.ini:/usr/local/etc/php/php.ini:ro
# - ./php74/laravel.ini /usr/local/etc/php/conf.d/laravel.ini
# - ./php74/opcache.ini:/usr/local/etc/php/conf.d/opcache.ini
php74:
container_name: php74
build:
context: ./php74
volumes:
- ../applications:/server:rw
# - ./php74/php7.4.ini:/usr/local/etc/php/php.ini:ro
# - ./php74/laravel.ini /usr/local/etc/php/conf.d/laravel.ini
# - ./php74/opcache.ini:/usr/local/etc/php/conf.d/opcache.ini
php80:
container_name: php80
build:
context: ./php8.0
restart: always
links:
- redis
- mysql
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
ports:
- "8111:8000"
volumes:
- ../learnDemo/hyperf:/hyperf:rw
- ../learnDemo/laravel9:/server:rw
- ../learnDemo/gdoo:/serverGDOO:rw
- ./php8.0/php/php.ini:/usr/local/etc/php/php.ini:ro
- ./php8.0/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
php:
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
environment:
- TZ=Asia/Shanghai
links:
- redis
- mysql
- es
- rabbitmq
depends_on:
- redis
- mysql
- es
- rabbitmq
volumes:
- ../applications:/server:rw
- ./php/php.ini:/usr/local/etc/php/php.ini:ro
- ./php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
- ./php/policy.xml:/etc/ImageMagick-6/policy.xml
- ./php/cron/:/var/spool/cron:ro
image: zengfa/php:72
ports:
- "8000:8000"
container_name: php
# queue:
# restart: always
# logging:
# driver: json-file
# options:
# max-size: "100M"
# max-file: "10"
# environment:
# - TZ=Asia/Shanghai
# - APP_URL=http://localhost # 改成自己的ip
# links:
# - redis
# - mysql
# - es
# - rabbitmq
# depends_on:
# - redis
# - mysql
# - es
# - rabbitmq
# volumes:
# - ../:/server:rw
# - ./php/php.ini:/usr/local/etc/php/php.ini:ro
# - ./php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
# - ./php/policy.xml:/etc/ImageMagick-6/policy.xml
# image: zengfa/php:72
# container_name: queue
# entrypoint: php /server/artisan queue:work --daemon --queue=high,default,low --timeout=120 --tries=5
rabbitmq:
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
environment:
RABBITMQ_NODENAME: rabbitmq
volumes:
- ./rabbitmq/plugins.erl:/etc/rabbitmq/enabled_plugins
- ./rabbitmq/definitions.json:/etc/rabbitmq/definitions.json
- ./rabbitmq/rabbitmq.config:/etc/rabbitmq/rabbitmq.config
- ./rabbitmq/cert/hzztai.pem:/cert/hzztai.pem:ro
- ./rabbitmq/cert/hzztai.key:/cert/hzztai.key:ro
ports:
- "5672:5672"
- "15674:15674"
- "15672:15672"
- "15675:15675"
build: ./rabbitmq/
image: rabbitmq:pis
container_name: rabbitmq
es:
# restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
environment:
- TZ=Asia/Shanghai
volumes:
- ./es/ik/:/usr/share/elasticsearch/plugins/ik:rw
- es_data:/usr/share/elasticsearch/data
ports:
- "9200:9200"
image: elasticsearch:6.7.0
container_name: es
nginx80:
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
ports:
- "8100:8100"
- "8200:8200"
depends_on:
- php80
links:
- php80
environment:
- TZ=Asia/Shanghai
volumes:
- ../learnDemo/laravel9:/server:rw
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./nginx/cert:/etc/nginx/cert:ro
image: zengfa/tengine
container_name: nginx80
nginx:
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
ports:
- "80:80"
- "443:443"
depends_on:
- php
links:
- php
- echo
environment:
- TZ=Asia/Shanghai
volumes:
- ../:/server:rw
- ../learnDemo/laravel9/laravel:/laravel:rw
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./nginx/cert:/etc/nginx/cert:ro
image: zengfa/tengine
container_name: nginx
#OpenResty® 是一个基于 Nginx 与 Lua 的高性能 Web 平台,其内部集成了大量精良的 Lua 库、第三方模块以及大多数的依赖项。用于方便地搭建能够处理超高并发、扩展性极高的动态 Web 应用、Web 服务和动态网关。
#OpenResty® 通过汇聚各种设计精良的 Nginx 模块(主要由 OpenResty 团队自主开发),从而将 Nginx 有效地变成一个强大的通用 Web 应用平台。这样,Web 开发人员和系统工程师可以使用 Lua 脚本语言调动 Nginx 支持的各种 C 以及 Lua 模块,快速构造出足以胜任 10K 乃至 1000K 以上单机并发连接的高性能 Web 应用系统。
#OpenResty® 的目标是让你的Web服务直接跑在 Nginx 服务内部,充分利用 Nginx 的非阻塞 I/O 模型,不仅仅对 HTTP 客户端请求,甚至于对远程后端诸如 MySQL、PostgreSQL、Memcached 以及 Redis 等都进行一致的高性能响应。
openresty:
restart: always
depends_on:
- php
links:
- php
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
ports:
- "8180-8199:8180-8199"
volumes:
- ../:/server:rw
- ./openresty/nginx.conf:/etc/nginx/nginx.conf:ro
- ./openresty/conf.d:/etc/nginx/conf.d:ro
- ./openresty/cert:/etc/nginx/cert:ro
image: openresty/openresty
container_name: openresty
echo:
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
image: zengfa/laravel-echo-server
environment:
- LARAVEL_ECHO_SERVER_HOST=0.0.0.0
- ECHO_ALLOW_ORIGIN=0.0.0.0
links:
- redis
depends_on:
- redis
ports:
- "6001:6001"
container_name: echo
portainer:
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
image: portainer/portainer
environment:
- TZ=Asia/Shanghai
ports:
- "9000:9000"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
container_name: portainer
# supervisord:
# restart: always
# logging:
# driver: json-file
# options:
# max-size: "100M"
# max-file: "10"
# environment:
# - TZ=Asia/Shanghai
# depends_on:
# - redis
# - es
# - rabbitmq
# links:
# - redis
# - es
# - rabbitmq
# volumes:
# - ../:/server:rw
# - ./php/php.ini:/usr/local/etc/php/php.ini:ro
# - ./php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
# - ./php/supervisor/supervisord.conf:/etc/supervisor/supervisord.conf:ro
# - ./php/policy.xml:/etc/ImageMagick-6/policy.xml
# image: zengfa/php:72
# container_name: supervisord
# entrypoint: /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
#allinurl/goaccess
mongo:
container_name: mongo
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
volumes:
- ./mongodb/data:/data/db
# ports:
# - 27017:27017
go:
container_name: go
image: golang
restart: always
tty: true
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
ports:
- "8280-8290:8280-8290"
links:
- mysql
- redis
volumes:
- ../go-lang/src:/go/src:rw
nginxwebui:
container_name: nginxwebui
image: cym1102/nginxwebui:latest
environment:
- BOOT_OPTIONS="--server.port=8080"
restart: always
tty: true
privileged: true #root权限
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
ports:
- "8080:8080"
volumes:
mysql_data:
driver: local
mysql_slave_data:
driver: local
es_data:
driver: local