-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy_docker-compose.yml
240 lines (226 loc) · 6.12 KB
/
my_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
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:8.2.4-amd64
depends_on:
- redis
- mysql
- mongo
links:
- redis
- mysql
- mongo
volumes:
- ../applications:/server:rw
- ./php8.2/php.ini:/usr/local/etc/php/php.ini:ro
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
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
nginx:
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
ports:
- "80:80"
- "443:443"
depends_on:
- php82
links:
- php82
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:
- php82
links:
- php82
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
portainer:
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
image: portainer/portainer
environment:
- TZ=Asia/Shanghai
ports:
- "9002: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
- ./mongodb/mongod.conf.orig:/etc/ongod.conf.orig:rw
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
volumes:
mysql_data:
driver: local
mysql_slave_data:
driver: local
es_data:
driver: local