-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
280 lines (268 loc) · 6.15 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
version: "3.8"
services:
## Nginx Web Container ###
nginx:
build: ./core/images/nginx
container_name: nginx
volumes:
- type: bind
source: ./www
target: /var/www/html
- ./core/conf/nginx/conf/nginx.conf:/etc/nginx/nginx.conf:ro
- ./core/conf/nginx/conf/conf.d:/etc/nginx/conf.d:ro
- ./web-conf:/etc/nginx/web-conf:ro
- ./logs/nginx/log:/var/log/nginx:rw
- type: bind
source: ./share-files
target: /var/www/share-files
- type: bind
source: ./ssl
target: /var/www/ssl
ports:
- "80:80"
- "443:443"
- "8080:80"
- "8035:80"
restart: always
networks:
- net-php71
# - net-php72
- net-php74
depends_on:
- php71
# - php72
- php74
### PHP FPM Container ###
php71:
build: ./core/images/php71
container_name: php71
volumes:
- type: bind
source: ./www
target: /var/www/html
- ./core/conf/php71/conf/php.ini:/etc/php7/php.ini:ro
- ./core/conf/php71/conf/php-fpm.conf:/etc/php7/php-fpm.conf:ro
- ./core/conf/php71/conf/conf.d/www.conf:/etc/php7/php-fpm.d/www.conf:ro
- type: bind
source: ../.ssh
target: /root/.ssh
- type: bind
source: ./share-files
target: /var/www/share-files
expose:
- "9071"
restart: always
networks:
- net-php71
- net-mysql
- net-elasticsearch
- net-redis
- net-rabbitmq
depends_on:
- mysql
- elasticsearch
- redis
- rabbitmq
# php72:
# build: ./core/images/php72
# container_name: php72
# volumes:
# - type: bind
# source: ./www
# target: /var/www/html
# - ./core/conf/php72/conf/php.ini:/etc/php7/php.ini:ro
# - ./core/conf/php72/conf/php-fpm.conf:/etc/php7/php-fpm.conf:ro
# - ./core/conf/php72/conf/php-fpm.d/www.conf:/etc/php7/php-fpm.d/www.conf:ro
# - type: bind
# source: ../.ssh
# target: /root/.ssh
# - type: bind
# source: ./share-files
# target: /var/www/share-files
# expose:
# - "9072"
# restart: always
# networks:
# - net-php72
# - net-mysql
# - net-elasticsearch
# - net-redis
# - net-rabbitmq
# depends_on:
# - mysql
# - elasticsearch
# - redis
php74:
build: ./core/images/php74
container_name: php74
volumes:
- type: bind
source: ./www
target: /var/www/html
- ./core/conf/php74/conf/php.ini-development:/usr/local/etc/php/php.ini:ro
- ./core/conf/php74/conf/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
- type: bind
source: ../.ssh
target: /root/.ssh
- type: bind
source: ./share-files
target: /var/www/share-files
expose:
- "9000"
restart: always
networks:
- net-php74
# - net-mysql
- net-mysql8
# - net-elasticsearch
- net-elasticsearch7
- net-redis
- net-rabbitmq
depends_on:
# - mysql
- mysql8
# - elasticsearch
- elasticsearch7
- redis
- rabbitmq
### MYSQL Container ###
mysql:
build: ./core/images/mysql
container_name: mysql
volumes:
- type: volume
source: db-mysql
target: /var/lib/mysql
volume:
nocopy: true
- ./core/conf/mysql/conf/my.cnf:/etc/mysql/my.cnf:ro
- type: bind
source: ./share-files
target: /var/www/share-files
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: 123456
restart: always
networks:
- net-mysql
### MYSQL8 Container ###
mysql8:
# platform: linux/amd64
build: ./core/images/mysql8
container_name: mysql8
volumes:
- type: volume
source: db-mysql8
target: /var/lib/mysql
volume:
nocopy: true
- ./core/conf/mysql8/conf/my.cnf:/etc/mysql/my.cnf:ro
- type: bind
source: ./share-files
target: /var/www/share-files
ports:
- "3308:3308"
environment:
MYSQL_ROOT_PASSWORD: 123456
restart: always
networks:
- net-mysql8
### ELASTICSEARCH Container ###
elasticsearch:
image: elasticsearch:6.8.15
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata:/usr/share/elasticsearch6/data
ports:
- "9200:9200"
restart: always
networks:
- net-elasticsearch
elasticsearch7:
image: elasticsearch:7.17.9
container_name: elasticsearch7
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata7:/usr/share/elasticsearch/data
ports:
- 9207:9200
restart: always
networks:
- net-elasticsearch7
### REDIS Container ###
redis:
build: ./core/images/redis
container_name: redis
volumes:
- redisdata:/data
ports:
- "6379:6379"
networks:
- net-redis
### Rabbitmq Container###
rabbitmq:
image: rabbitmq:3.8.3-management
container_name: rabbitmq3.8
volumes:
- rabbitmqdata:/data
ports:
- "15672:15672"
- "5672:5672"
restart: always
environment:
- RABBITMQ_DEFAULT_USER=root
- RABBITMQ_DEFAULT_PASS=123456
networks:
- net-rabbitmq
### Networks Setup ###
networks:
net-php71:
driver: bridge
# net-php72:
# driver: bridge
net-php74:
driver: bridge
net-mysql:
driver: bridge
net-mysql8:
driver: bridge
net-elasticsearch:
driver: bridge
net-elasticsearch7:
driver: bridge
net-redis:
driver: bridge
net-rabbitmq:
driver: bridge
### Volumes Setup ###
volumes:
db-mysql:
driver: local
db-mysql8:
driver: local
esdata:
driver: local
esdata7:
driver: local
redisdata:
driver: local
rabbitmqdata:
driver: local