-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.sample.yml
453 lines (429 loc) · 11.1 KB
/
docker-compose.sample.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
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
version: "3"
services:
nginx:
build:
context: ./services/nginx
args:
NGINX_VERSION: nginx:${NGINX_VERSION}
CONTAINER_PACKAGE_URL: ${CONTAINER_PACKAGE_URL}
NGINX_INSTALL_APPS: ${NGINX_INSTALL_APPS}
container_name: nginx
ports:
- "${NGINX_HTTP_HOST_PORT}:80"
- "${NGINX_HTTPS_HOST_PORT}:443"
depends_on:
- php
- php71
- php56
volumes:
- ${SOURCE_DIR}:/www/:rw
- ${NGINX_SSL_CERTIFICATE_DIR}:/ssl:rw
- ${NGINX_CONFD_DIR}:/etc/nginx/conf.d/:rw
- ${NGINX_CONF_FILE}:/etc/nginx/nginx.conf:ro
- ${NGINX_FASTCGI_PHP_CONF}:/etc/nginx/fastcgi-php.conf:ro
- ${NGINX_FASTCGI_PARAMS}:/etc/nginx/fastcgi_params:ro
- ${NGINX_LOG_DIR}:/var/log/nginx/:rw
cap_add:
- SYS_PTRACE
environment:
TZ: "$TZ"
restart: always
networks:
- default
php8:
build:
context: ./services/php
args:
PHP_VERSION: php:${PHP8_VERSION}-fpm-alpine
CONTAINER_PACKAGE_URL: ${CONTAINER_PACKAGE_URL}
PHP_EXTENSIONS: ${PHP8_EXTENSIONS}
TZ: "$TZ"
container_name: php8
# extra_hosts:
# - "master.com:192.168.93.1"
expose:
- 9501
external_links:
- oracle11g:chemdb
volumes:
- ${SOURCE_DIR}:/www/:rw
- ${PHP8_PHP_CONF_FILE}:/usr/local/etc/php/php.ini:ro
- ${PHP8_FPM_CONF_FILE}:/usr/local/etc/php-fpm.d/www.conf:rw
- ${PHP8_LOG_DIR}:/var/log/php
- ${DATA_DIR}/composer:/tmp/composer
- ${DATA_DIR}/php:/tmp/extensions
restart: always
cap_add:
- SYS_PTRACE
networks:
- default
php:
build:
context: ./services/php
args:
PHP_VERSION: php:${PHP_VERSION}-fpm-alpine
CONTAINER_PACKAGE_URL: ${CONTAINER_PACKAGE_URL}
PHP_EXTENSIONS: ${PHP_EXTENSIONS}
TZ: "$TZ"
container_name: php
# extra_hosts:
# - "tsinghua.kuaiqucai.com:114.116.97.162"
expose:
- 9501
external_links:
- oracle11g:chemdb
volumes:
- ${SOURCE_DIR}:/www/:rw
- ${PHP_PHP_CONF_FILE}:/usr/local/etc/php/php.ini:ro
- ${PHP_FPM_CONF_FILE}:/usr/local/etc/php-fpm.d/www.conf:rw
- ${PHP_LOG_DIR}:/var/log/php
- ${DATA_DIR}/composer:/tmp/composer
- ${DATA_DIR}/php:/tmp/extensions
restart: always
cap_add:
- SYS_PTRACE
networks:
- default
php71:
build:
context: ./services/php
args:
PHP_VERSION: php:${PHP71_VERSION}-fpm-alpine
CONTAINER_PACKAGE_URL: ${CONTAINER_PACKAGE_URL}
PHP_EXTENSIONS: ${PHP71_EXTENSIONS}
TZ: "$TZ"
container_name: php71
expose:
- 9501
volumes:
- ${SOURCE_DIR}:/www/:rw
- ${PHP71_PHP_CONF_FILE}:/usr/local/etc/php/php.ini:ro
- ${PHP71_FPM_CONF_FILE}:/usr/local/etc/php-fpm.d/www.conf:rw
- ${PHP71_LOG_DIR}:/var/log/php
- ${DATA_DIR}/composer:/tmp/composer
- ${DATA_DIR}/php:/tmp/extensions
restart: always
external_links:
- oracle11g:chemdb
cap_add:
- SYS_PTRACE
networks:
- default
php56:
build:
context: ./services/php
args:
PHP_VERSION: php:${PHP56_VERSION}-fpm-alpine
CONTAINER_PACKAGE_URL: ${CONTAINER_PACKAGE_URL}
PHP_EXTENSIONS: ${PHP56_EXTENSIONS}
TZ: "$TZ"
container_name: php56
expose:
- 9501
volumes:
- ${SOURCE_DIR}:/www/:rw
- ${PHP56_PHP_CONF_FILE}:/usr/local/etc/php/php.ini:ro
- ${PHP56_FPM_CONF_FILE}:/usr/local/etc/php-fpm.d/www.conf:rw
- ${PHP56_LOG_DIR}:/var/log/php
- ${DATA_DIR}/composer:/tmp/composer
- ${DATA_DIR}/php:/tmp/extensions
restart: always
external_links:
- oracle11g:chemdb
cap_add:
- SYS_PTRACE
networks:
- default
oracle11g:
image: jaspeen/oracle-11g
container_name: oracle11g
ports:
- "1521:1521"
volumes:
- ${ORACLE_DIR}/install:/install/:rw
- ${ORACLE_DPDUMP_DIR}/dpdump:/opt/oracle/dpdump/:rw
- ${SOURCE_DIR}:/www/:rw
environment:
TZ: "$TZ"
networks:
- default
mysql:
image: mysql:${MYSQL_VERSION}
container_name: mysql
ports:
- "${MYSQL_HOST_PORT}:3306"
volumes:
- ${MYSQL_CONF_FILE}:/etc/mysql/conf.d/mysql.cnf:ro
- ${DATA_DIR}/mysql:/var/lib/mysql/:rw
- ${SOURCE_DIR}:/www/:rw
restart: always
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
TZ: "$TZ"
networks:
- default
mysql5:
image: mysql:${MYSQL5_VERSION}
container_name: mysql5
ports:
- "${MYSQL5_HOST_PORT}:3306"
volumes:
- ${MYSQL5_CONF_FILE}:/etc/mysql/conf.d/mysql.cnf:ro
- ${DATA_DIR}/mysql5:/var/lib/mysql/:rw
- ${SOURCE_DIR}:/www/:rw
restart: always
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL5_ROOT_PASSWORD}"
TZ: "$TZ"
networks:
- default
redis:
image: redis:${REDIS_VERSION}
container_name: redis
ports:
- "${REDIS_HOST_PORT}:6379"
volumes:
- ${REDIS_CONF_FILE}:/etc/redis.conf:ro
- ${DATA_DIR}/redis:/data/:rw
- ${SOURCE_DIR}:/www/:rw
restart: always
entrypoint: ["redis-server", "/etc/redis.conf"]
environment:
TZ: "$TZ"
networks:
- default
memcached:
image: memcached:${MEMCACHED_VERSION}
container_name: memcached
ports:
- "${MEMCACHED_HOST_PORT}:11211"
environment:
MEMCACHED_CACHE_SIZE: "${MEMCACHED_CACHE_SIZE}"
networks:
- default
rabbitmq:
image: rabbitmq:${RABBITMQ_VERSION}
container_name: rabbitmq
# restart: always
ports:
- "${RABBITMQ_HOST_PORT_C}:5672"
- "${RABBITMQ_HOST_PORT_S}:15672"
environment:
TZ: "$TZ"
RABBITMQ_DEFAULT_USER: "${RABBITMQ_DEFAULT_USER}"
RABBITMQ_DEFAULT_PASS: "${RABBITMQ_DEFAULT_PASS}"
networks:
- default
mongodb:
image: mongo:${MONGODB_VERSION}
container_name: mongodb
environment:
MONGO_INITDB_ROOT_USERNAME: "${MONGODB_INITDB_ROOT_USERNAME}"
MONGO_INITDB_ROOT_PASSWORD: "${MONGODB_INITDB_ROOT_PASSWORD}"
TZ: "$TZ"
volumes:
- ${DATA_DIR}/mongo:/data/db:rw
- ${DATA_DIR}/mongo_key:/mongo:rw
- ${SOURCE_DIR}:/www/:rw
ports:
- "${MONGODB_HOST_PORT}:27017"
networks:
- default
command:
--auth
elasticsearch:
build:
context: ./services/elasticsearch
args:
ELASTICSEARCH_VERSION: ${ELASTICSEARCH_VERSION}
ELASTICSEARCH_PLUGINS: ${ELASTICSEARCH_PLUGINS}
container_name: elasticsearch
environment:
- TZ=$TZ
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- ${DATA_DIR}/esdata:/usr/share/elasticsearch/data
- ${DATA_DIR}/esdata/plugins:/usr/share/elasticsearch/plugins
- ${ELASTICSEARCH_CONF_FILE}:/usr/share/elasticsearch/config/elasticsearch.yml
- ${ES_LOG_DIR}:/usr/share/elasticsearch/logs
- ${SOURCE_DIR}:/www/:rw
hostname: elasticsearch
ports:
- "${ELASTICSEARCH_HOST_PORT_C}:9200"
- "${ELASTICSEARCH_HOST_PORT_S}:9300"
node:
container_name: node
build:
context: ./services/node
args:
NODE_VERSION: node:${NODE_VERSION}
volumes:
- ${SOURCE_DIR}:/www/:rw
expose:
- "8081"
ports:
- "${NODE_PORT}:8088"
networks:
- default
restart: always
stdin_open: true
tty: true
jdk8:
container_name: jdk8 #配置容器名
build:
context: ./services/java
ports:
- "8080:8080" # 暴露端口
volumes:
- ${SOURCE_DIR}:/www/:rw
stdin_open: true # -i interactive
tty: true # -t tty
privileged: true
networks:
- default
go:
container_name: go
build:
context: ./services/go
ports:
- "9000:9000"
volumes:
- ${SOURCE_DIR}:/www/:rw
tty: true
privileged: true
networks:
- default
sql-web:
container_name: sql-web
build:
context: ./services/soar-web
ports:
- "5077:5077"
volumes:
- ${SOURCE_DIR}:/www/:rw
networks:
- default
python:
container_name: python
build:
context: ./services/python
ports:
- "8888:8888"
- "5000:5000"
volumes:
- ${SOURCE_DIR}:/www/:rw
tty: true
privileged: true
networks:
- default
openresty:
image: openresty/openresty:${OPENRESTY_VERSION}
container_name: openresty
ports:
- "${OPENRESTY_HTTP_HOST_PORT}:80"
- "${OPENRESTY_HTTPS_HOST_PORT}:443"
volumes:
- ${SOURCE_DIR}:/www/:rw
- ${OPENRESTY_CONFD_DIR}:/etc/nginx/conf.d/:ro
- ${OPENRESTY_SSL_CERTIFICATE_DIR}:/ssl:rw
- ${OPENRESTY_CONF_FILE}:/usr/local/openresty/nginx/conf/nginx.conf:ro
- ${OPENRESTY_FASTCGI_PHP_CONF}:/usr/local/openresty/nginx/conf/fastcgi-php.conf:ro
- ${OPENRESTY_CONF_FASTCGIPARAMS_FILE}:/usr/local/openresty/nginx/conf/fastcgi_params:ro
- ${OPENRESTY_LOG_DIR}:/var/log/nginx/:rw
environment:
TZ: "$TZ"
networks:
- default
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: phpmyadmin
ports:
- "${PHPMYADMIN_HOST_PORT}:80"
volumes:
- ${PHPMYADMIN_USER_CONF_FILE}:/etc/phpmyadmin/config.user.inc.php:ro
- ${PHPMYADMIN_PHP_CONF_FILE}:/usr/local/etc/php/conf.d/php-phpmyadmin.ini:ro
networks:
- default
environment:
- PMA_HOST=mysql
- PMA_PORT=3306
- TZ=$TZ
phpredisadmin:
image: erikdubbelboer/phpredisadmin:latest
container_name: phpredisadmin
ports:
- "${REDISMYADMIN_HOST_PORT}:80"
networks:
- default
environment:
- REDIS_1_HOST=redis
- REDIS_1_PORT=6379
- TZ=$TZ
kibana:
image: kibana:${KIBANA_VERSION}
container_name: kibana
environment:
TZ: "$TZ"
elasticsearch.hosts: http://elasticsearch:9200
I18N_LOCALE: "${KIBANA_I18N_LOCALE}"
hostname: kibana
depends_on:
- elasticsearch
restart: always
ports:
- "${KIBANA_HOST}:5601"
logstash:
image: logstash:${LOGSTASH_VERSION}
container_name: logstash
hostname: logstash
restart: always
depends_on:
- elasticsearch
environment:
TZ: "$TZ"
ports:
- "${LOGSTASH_HOST_PORT_C}:9600"
- "${LOGSTASH_HOST_PORT_S}:5044"
supervisor:
build:
context: ./services/supervisor
args:
ALPINE_VERSION: alpine:${ALPINE_VERSION}
TZ: "$TZ"
CONTAINER_PACKAGE_URL: ${CONTAINER_PACKAGE_URL}
container_name: supervisor
ports:
- "${SUPERVISOR_HOST_PORT_C}:9001"
volumes:
- ${SOURCE_DIR}:/www/:rw
- ${SUPERVISOR_LOG}:/var/log/supervisor/:rw
- ${SUPERVISOR_CONFIG}:/etc/supervisor/conf.d/:rw
- ${SUPERVISOR_CONF_FILE}:/etc/supervisor/supervisord.conf:ro
command:
- /bin/sh
- -c
- |
supervisord -n -c /etc/supervisor/supervisord.conf
restart: always
cap_add:
- SYS_PTRACE
networks:
- default
hyperf:
build:
context: ./services/hyperf
container_name: hyperf
ports:
- "9501:9501"
volumes:
- ${SOURCE_DIR}:/www/:rw
privileged: true
restart: always
tty: true
cap_add:
- SYS_PTRACE
networks:
- default
networks:
default: