This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
418 lines (396 loc) · 10.1 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
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
services:
nginx:
image: ${DOCKER_REGISTRY_COMPOSE}/nginx:latest
container_name: nginx
restart: always
deploy:
resources:
limits:
cpus: "1"
memory: 512M
ports:
- "8080:80"
- "443:443"
volumes:
- ./runtime/logs/nginx:/var/log/nginx
- ./runtime/conf/nginx:/etc/nginx
- /Users/imxieke/Code/Project/boxs:/data
# - ./conf/nginx/nginx.conf:/etc/nginx/nginx.conf
links:
# set php74 aliasor direct to use mysql57 no alias set
- php74:php74
networks:
- boxs
php74:
image: ${DOCKER_REGISTRY_COMPOSE}/php:74
container_name: php74
restart: always
depends_on:
- mysql57
ports:
- "19000:9000"
volumes:
- ./runtime/logs/php74:/var/log/php-fpm
- /Users/imxieke/Code/Project/boxs:/data
networks:
- boxs
dns:
- 223.5.5.5
- 8.8.8.8
php80:
image: ${DOCKER_REGISTRY_COMPOSE}/php:80
container_name: php80
restart: always
depends_on:
- mysql57
- redis
- memcached
links:
- mysql57:mysql57
- redis:redis
- memcached:memcached
ports:
- "29000:9000"
volumes:
- /Users/imxieke/Code/Project/boxs:/data
- ./runtime/logs/php80/:/var/log/php-fpm/
networks:
- boxs
dns:
- 223.5.5.5
- 8.8.8.8
php81:
image: ${DOCKER_REGISTRY_COMPOSE}/php:81
container_name: php81
restart: always
depends_on:
- mysql57
ports:
- "39000:9000"
volumes:
- ./runtime/logs/php81/:/var/log/php-fpm/
networks:
- boxs
dns:
- 223.5.5.5
- 8.8.8.8
php82:
image: ${DOCKER_REGISTRY_COMPOSE}/php:82
container_name: php82
restart: always
depends_on:
- mysql57
ports:
- "49000:9000"
volumes:
- ./runtime/logs/php82/:/var/log/php-fpm/
networks:
- boxs
dns:
- 223.5.5.5
- 8.8.8.8
# hhvm:
# image: ${DOCKER_REGISTRY_COMPOSE}/hhvm:latest
# expose:
# - "9000"
mysql57:
image: ${DOCKER_REGISTRY_COMPOSE}/mysql:5.7
hostname: mysql57
container_name: mysql57
restart: always
expose:
- "3306"
ports:
- "${MYSQL57_PORT}:3306"
volumes:
# - ./runtime/data/mysql57:/var/lib/mysql
- mysql57:/var/lib/mysql
- ./runtime/logs/mysql57/:/var/log/mysql
environment:
- TZ=${TIMEZONE}
- MYSQL_ROOT_PASSWORD=${MYSQL57_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL57_DATABASE}
- MYSQL_USER=${MYSQL57_USER}
- MYSQL_PASSWORD=${MYSQL57_PASSWORD}
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
#only for container without host
networks:
- boxs
postgres15:
image: ${DOCKER_REGISTRY_COMPOSE}/postgres:15
hostname: postgres15
container_name: postgres15
restart: always
ports:
- "5432:5432"
volumes:
- postgres15:/var/lib/postgresql/data
environment:
- POSTGRES_DB=default
- POSTGRES_USER=dockenv
- POSTGRES_PASSWORD=dockenv
mysql80:
image: ${DOCKER_REGISTRY_COMPOSE}/mysql:8.0
hostname: mysql80
container_name: mysql80
restart: always
# Only for Container
expose:
- "3306"
ports:
- "${MYSQL80_PORT}:3306"
volumes:
- mysql80:/var/lib/mysql
- ./runtime/logs/mysql80/:/var/log/mysql
environment:
- TZ=${TIMEZONE}
- MYSQL_ROOT_PASSWORD=${MYSQL80_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL80_DATABASE}
- MYSQL_USER=${MYSQL80_USER}
- MYSQL_PASSWORD=${MYSQL80_PASSWORD}
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
#only for container without host
networks:
boxs:
ipv4_address: ${MYSQL80_IP}
mariadb:
image: ${DOCKER_REGISTRY_COMPOSE}/mariadb:latest
hostname: mariadb
container_name: mariadb
restart: always
expose:
- "3306"
ports:
- "${MARIADB_PORT}:3306"
volumes:
- mariadb:/var/lib/mysql
- ./runtime/logs/mariadb/:/var/log/mysql
environment:
- TZ=${TIMEZONE}
- MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
- MYSQL_DATABASE=${MARIADB_DATABASE}
- MYSQL_USER=${MARIADB_USER}
- MYSQL_PASSWORD=${MARIADB_PASSWORD}
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
#only for container without host
networks:
boxs:
ipv4_address: ${MARIADB_IP}
redis:
image: ${DOCKER_REGISTRY_COMPOSE}/redis:latest
container_name: redis
hostname: redis
ports:
- "6379:6379/tcp"
networks:
boxs:
ipv4_address: ${REDIS_IP}
restart: always
volumes:
- ./runtime/conf/redis:/etc/redis
- redis:/data
- ./runtime/logs/redis:/var/log/redis
command: redis-server /etc/redis/redis.conf
memcached:
image: ${DOCKER_REGISTRY_COMPOSE}/memcached:latest
hostname: memcached
container_name: memcached
ports:
- ${MEMCACHED_PORT}:11211
mongo:
image: ${DOCKER_REGISTRY_COMPOSE}/mongo:latest
ports:
- ${MONGO_PORT}:27017
restart: always
volumes:
- mongo:/data/db
- ./runtime/conf/mongo:/data/configdb
- ./runtime/logs/mongo:/var/log/mongo
environment:
TZ: ${TIMEZONE}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD}
# command: mongod --config /etc/mongod.conf
networks:
- boxs
elastic:
image: ${DOCKER_REGISTRY_COMPOSE}/elastic:latest
hostname: elastic
container_name: elastic
restart: always
environment:
- ELASTIC_PASSWORD=dockenv
# - ENROLLMENT_TOKEN=dockenv
- cluster.name=dockenv
- discovery.type=single-node
# 默认禁用 elasticsearch https 和登陆账号密码 仅适用于 Docker 测试环境
- xpack.security.enabled=false
- xpack.security.enrollment.enabled=false
- xpack.security.http.ssl.enabled=false
- xpack.security.transport.ssl.enabled=false
# - bootstrap.memory_lock=true
# - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
# - script.painless.regex.enabled=true
# - node.master=false
# - node.data=true
- TZ=${TIMEZONE}
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- elastic:/usr/share/elasticsearch/data
# - ${ELASTICSEARCH_CONF_FILE}:/usr/share/elasticsearch/config/elasticsearch.yml
ports:
- "9200:9200"
- "9300:9300"
networks:
boxs:
ipv4_address: ${ELASTICSEARCH_IP}
kibana:
image: ${DOCKER_REGISTRY_COMPOSE}/kibana:latest
hostname: kibana
container_name: kibana
restart: always
environment:
- SERVER_NAME=kibana
- ELASTICSEARCH_HOSTS=["http://${ELASTICSEARCH_IP}:9200"]
# - ELASTICSEARCH_HOSTS=https://elastic:9200
ports:
- "5601:5601"
depends_on:
- elastic
links:
- elastic:elastic
networks:
boxs:
ipv4_address: ${KIBANA_IP}
logstash:
image: ${DOCKER_REGISTRY_COMPOSE}/logstash:latest
hostname: logstash
container_name: logstash
restart: always
ports:
- "9600:9600"
- "5044:5044"
networks:
boxs:
ipv4_address: ${LOGSTASH_IP}
rabbitmq:
image: ${DOCKER_REGISTRY_COMPOSE}/rabbitmq:latest
hostname: rabbitmq
container_name: rabbitmq
restart: always
ports:
- "4369:4369"
- "5671:5671"
- "5672:5672"
- "15691:15691"
- "15692:15692"
- "25672:25672"
environment:
TZ: "${TIMEZONE}"
RABBITMQ_DEFAULT_USER: "${RABBITMQ_DEFAULT_USER}"
RABBITMQ_DEFAULT_PASS: "${RABBITMQ_DEFAULT_PASS}"
RABBITMQ_NODE_IP_ADDRESS: "${RBMQ_IP}"
volumes:
- ./runtime/data/rabbitmq:/var/lib/rabbitmq
- ./runtime/logs/rabbitmq:/var/log/rabbitmq
networks:
boxs:
ipv4_address: ${RBMQ_IP}
# portainer:
# image: ${DOCKER_REGISTRY_COMPOSE}/portainer:latest
# hostname: portainer
# container_name: portainer
# restart: always
# ports:
# - "9000:9000"
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock:cached
# - ./runtime/data/portainer/:/data:cached
# networks:
# boxs:
# aria2:
# image: ${DOCKER_REGISTRY_COMPOSE}/aria2:latest
# hostname: aria2
# container_name: aria2
# ports:
# - "6800:6800"
# - "6801:6801"
# - "6802-6999:6802-6999"
# volumes:
# - $HOME/Downloads:/data/downloads:rw
# # - /Users/imxieke/Code/Project/dockenv/images/aria2/conf:/etc/aria2c
# environment:
# RPC_SECRET: dockenv
# ARIA2_PORT: 6800
# WEBUI_PORT: 6801
# DHT_PORT: "6802-6999"
# networks:
# boxs:
# gitea:
# image: ${DOCKER_REGISTRY_COMPOSE}/gitea:latest
# hostname: gitea
# container_name: gitea
# restart: always
# environment:
# - USER_UID=1000
# - USER_GID=1000
# # - GITEA_CUSTOM=/etc/gitea
# ports:
# - "3000:3000"
# - "3022:22"
# depends_on:
# - mysql80
# links:
# - mysql80:mysql80
# volumes:
# - gitea:/data
# # - ./runtime/conf/gitea:/etc/gitea
# networks:
# boxs:
# default password ,default user: root
# grep 'Password:' /etc/gitlab/initial_root_password
# gitlab:
# # image: ${DOCKER_REGISTRY_COMPOSE}/gitea:latest
# image: registry.gitlab.cn/omnibus/gitlab-jh:latest
# hostname: gitlab
# container_name: gitlab
# restart: always
# shm_size: 256mb
# environment:
# - GITLAB_ROOT_PASSWORD=dockenv@gitlab
# ports:
# - "2022:22"
# - "2080:80"
# - "2443:443"
# volumes:
# # - gitlabconf:/etc/gitlab
# - ./runtime/conf/gitlab:/etc/gitlab
# # - gitlablogs:/var/log/gitlab
# - ./runtime/logs/gitlab:/var/log/gitlab
# - gitlabdata:/var/opt/gitlab
# networks:
# boxs:
volumes:
redis:
mongo:
mariadb:
mongo-conf:
mysql57:
mysql80:
postgres15:
elastic:
# gitea:
networks:
boxs:
driver: bridge
ipam:
driver: default
config:
- subnet: ${SUBNET_IP}
gateway: ${GATEWAY_IP}