-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
402 lines (359 loc) · 11.6 KB
/
docker-compose.yml
File metadata and controls
402 lines (359 loc) · 11.6 KB
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
version: '2'
services:
### Applications Code Container #############################
applications:
image: tianon/true
volumes:
- ${APPLICATIONS}:/var/www
- ./ssl/:/etc/ssl
### Node and Workspace Container #######################################
node:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
build:
context: ./node
args:
- TZ=${NODE_TIMEZONE}
dockerfile: "Dockerfile"
volumes_from:
- applications
extra_hosts:
- "dockerhost:${DOCKERHOST}"
- "localmachine:${LOCALMACHINE}"
- "${EXTRA_HOST}:127.0.0.1"
ports:
- "3000"
- "${NODE_SSH_PORT}:22"
tty: true
### Workspace Utilities Container ###########################
workspace:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
image: ignatisd/workspace:${WORKSPACE_PHP_VERSION}
build:
context: ./workspace
args:
- COMPOSER_GLOBAL_INSTALL=${COMPOSER_GLOBAL_INSTALL}
- INSTALL_WORKSPACE_SSH=${INSTALL_WORKSPACE_SSH}
- INSTALL_SOAP=${INSTALL_SOAP}
- INSTALL_ZIP_ARCHIVE=${INSTALL_ZIP_ARCHIVE}
- INSTALL_BCMATH=${INSTALL_BCMATH}
- INSTALL_PHPREDIS=${INSTALL_PHPREDIS}
- INSTALL_MEMCACHED=${INSTALL_MEMCACHED}
- INSTALL_GETTEXT=${INSTALL_GETTEXT}
- INSTALL_XDEBUG=${INSTALL_XDEBUG}
# - INSTALL_MONGO=${INSTALL_MONGO}
- INSTALL_IMAP=${INSTALL_IMAP}
- INSTALL_OPCACHE=${INSTALL_OPCACHE}
- INSTALL_EXIF=${INSTALL_EXIF}
- INSTALL_AEROSPIKE_EXTENSION=${INSTALL_AEROSPIKE_EXTENSION}
- CODEIGNITER=${CODEIGNITER}
- PUID=1000
- PGID=1000
- TZ=${TZ}
dockerfile: Dockerfile-${WORKSPACE_PHP_VERSION}
volumes_from:
- applications
extra_hosts:
# IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
- "dockerhost:${DOCKERHOST}"
- "localmachine:${LOCALMACHINE}"
- "${EXTRA_HOST}:127.0.0.1"
ports:
- "${WORKSPACE_SSH_PORT}:22"
- "7777:7777"
tty: true
### PHP-FPM Container #######################################
php-fpm:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
image: ignatisd/php-fpm:${PHP_VERSION}
build:
context: ./php-fpm
args:
- INSTALL_SOAP=${INSTALL_SOAP}
- INSTALL_ZIP_ARCHIVE=${INSTALL_ZIP_ARCHIVE}
- INSTALL_BCMATH=${INSTALL_BCMATH}
- INSTALL_PHPREDIS=${INSTALL_PHPREDIS}
- INSTALL_MEMCACHED=${INSTALL_MEMCACHED}
- INSTALL_GETTEXT=${INSTALL_GETTEXT}
- INSTALL_XDEBUG=${INSTALL_XDEBUG}
# - INSTALL_MONGO=${INSTALL_MONGO}
- INSTALL_IMAP=${INSTALL_IMAP}
- INSTALL_OPCACHE=${INSTALL_OPCACHE}
- INSTALL_EXIF=${INSTALL_EXIF}
- INSTALL_AEROSPIKE_EXTENSION=${INSTALL_AEROSPIKE_EXTENSION}
- CODEIGNITER=false
dockerfile: Dockerfile-${PHP_VERSION}
volumes_from:
- applications
ports:
- "${PHP_FPM}:9000"
extra_hosts:
# IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
- "dockerhost:${DOCKERHOST}"
- "localmachine:${LOCALMACHINE}"
- "${EXTRA_HOST}:127.0.0.1"
environment:
# IMPORTANT: Set the Remote Interpreter entry matching name to `laravel`
- PHP_IDE_CONFIG=serverName=laravel
### Nginx Server Container ##################################
nginx:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
image: nginx:1.14
volumes_from:
- applications
volumes:
- nginx:/var/log/nginx
- ./nginx/sites-enabled/:/etc/nginx/sites-enabled
- ./nginx/conf.d/:/etc/nginx/conf.d
- ./nginx/nginx.conf/:/etc/nginx/nginx.conf
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
depends_on:
- apache2
### Nginx Server Container ##################################
nginx-node:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
image: nginx:1.14
volumes_from:
- applications
volumes:
- nginx:/var/log/nginx
- ./nginx/sites-enabled-node/:/etc/nginx/sites-enabled
- ./nginx/conf.d-node/:/etc/nginx/conf.d
- ./nginx/nginx.conf/:/etc/nginx/nginx.conf
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
depends_on:
- node
### Apache Server Container #################################
apache2:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
image: ignatisd/apache2
build:
context: ./apache2
args:
- PHP_SOCKET=php-fpm:9000
volumes_from:
- applications
volumes:
- apache2:/var/log/apache2
ports:
- "80"
- "443"
depends_on:
- php-fpm
### MySQL Container #########################################
mysql:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASS}
volumes:
- ${DATA_SAVE_PATH}/mysql:/var/lib/mysql
- ./mysql/conf.d/:/etc/mysql/conf.d/
ports:
- "${DB_PORT}:3306"
mysql8:
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
image: mysql:8.0.12
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASS}
volumes:
- ${DATA_SAVE_PATH}/mysql8:/var/lib/mysql
- ./mysql/conf.d/:/etc/mysql/conf.d/
ports:
- "${DB_PORT}:3306"
### MariaDB Container #######################################
mariadb:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
build: ./mariadb
volumes:
- ${DATA_SAVE_PATH}/mariadb:/var/lib/mysql
ports:
- "${DB_PORT}:3306"
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASS}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
### Mailhog Container #########################################
mailhog:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
image: mailhog/mailhog
ports:
- "1025:1025"
- "8025:8025"
### MongoDB Container #######################################
mongo:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
build: ./mongo
ports:
- "${MONGODB_PORT}:27017"
volumes:
- ${MONGODB_SAVE_PATH}:/data/db
- mongo:/var/log/mongodb/
entrypoint:
- "mongod"
# The first time comment out the auth section to setup a user
# Afterwards enable the auth section for security
# - "--auth"
### Redis Container #########################################
redis:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
image: redis:4
volumes:
- redis:/data
ports:
- "${REDIS_PORT}:6379"
### Memcached Container #####################################
memcached:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
build: ./memcached
volumes:
- memcached:/var/lib/memcached
ports:
- "${MEMCACHED_PORT}:11211"
links:
- php-fpm
### Beanstalkd Container ####################################
beanstalkd:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
build: ./beanstalkd
ports:
- "${BEANSTALKD_PORT}:11300"
privileged: true
links:
- php-fpm
### Beanstalkd Console Container ############################
beanstalkd-console:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
build: ./beanstalkd-console
ports:
- "${BEANCONSOLE_PORT}:2080"
links:
- beanstalkd
### phpMyAdmin Container ####################################
phpmyadmin:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
image: phpmyadmin/phpmyadmin:5.0.1
volumes:
- sessions:/sessions
environment:
PMA_ARBITRARY: 1
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASS}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
UPLOAD_LIMIT: 256000000
ports:
- "${PHPMYADMIN_PORT}:80"
### ElasticSearch Container #################################
elasticsearch:
hostname: localhost
dns:
- "8.8.8.8"
- "8.8.4.4"
dns_search: '' #fix for windows dns resolve.conf
image: docker.elastic.co/elasticsearch/elasticsearch:7.2.0
environment:
- "network.host=0.0.0.0"
- "network.publish_host=elasticsearch"
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
- "xpack.security.enabled=false"
- "node.name=elasticsearch"
- "node.master=true"
- "node.data=true"
- "node.ingest=true"
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
- elasticsearch-plugins:/usr/share/elasticsearch/plugins
ports:
- "${ELASTICSEARCH_PORT}:9200"
- "9300:9300"
### Volumes Setup ###########################################
volumes:
apache2:
driver: "local"
nginx:
driver: "local"
memcached:
driver: "local"
redis:
driver: "local"
mongo:
driver: "local"
elasticsearch-data:
driver: "local"
elasticsearch-plugins:
driver: "local"
sessions: ## nothing is connected to this (- ./data/sessions:/sessions)
driver: "local"