· 8 years ago · Sep 08, 2017, 02:30 AM
1version: '2'
2
3services:
4
5### Applications Code Container #############################
6
7 applications:
8 image: tianon/true
9 volumes:
10 - ${APPLICATION}:/var/www
11
12### Workspace Utilities Container ###########################
13
14 workspace:
15 build:
16 context: ./workspace
17 args:
18 - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
19 - INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
20 - INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
21 - INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
22 - INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
23 - INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
24 - INSTALL_AEROSPIKE_EXTENSION=${WORKSPACE_INSTALL_AEROSPIKE_EXTENSION}
25 - INSTALL_V8JS_EXTENSION=${WORKSPACE_INSTALL_INSTALL_V8JS_EXTENSION}
26 - COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
27 - INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH}
28 - INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY}
29 - INSTALL_DEPLOYER=${WORKSPACE_INSTALL_LARAVEL_ENVOY}
30 - INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LARAVEL_ENVOY}
31 - INSTALL_MC=${WORKSPACE_INSTALL_MC}
32 - PUID=${WORKSPACE_PUID}
33 - PGID=${WORKSPACE_PGID}
34 - NODE_VERSION=${WORKSPACE_NODE_VERSION}
35 - YARN_VERSION=${WORKSPACE_YARN_VERSION}
36 - TZ=${WORKSPACE_TIMEZONE}
37 dockerfile: "Dockerfile-71"
38 volumes_from:
39 - applications
40 extra_hosts:
41 - "dockerhost:${DOCKER_HOST_IP}"
42 ports:
43 - "${WORKSPACE_SSH_PORT}:22"
44 tty: true
45
46### PHP-FPM Container #######################################
47
48 php-fpm:
49 build:
50 context: ./php-fpm
51 args:
52 - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
53 - INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
54 - INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
55 - INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE}
56 - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
57 - INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS}
58 - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
59 - INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE}
60 - INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF}
61 - INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_INSTALL_AEROSPIKE_EXTENSION}
62 - INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
63 - INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER}
64 - INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
65 dockerfile: ${PHP_FPM_DOCKER_FILE}
66 volumes_from:
67 - applications
68 expose:
69 - "9000"
70 depends_on:
71 - workspace
72 extra_hosts:
73 - "dockerhost:${DOCKER_HOST_IP}"
74 environment:
75 - PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
76
77#### PHP Worker Container #####################################
78# php-worker:
79# build:
80# context: ./php-worker
81# volumes_from:
82# - applications
83# depends_on:
84# - workspace
85
86### Nginx Server Container ##################################
87
88 nginx:
89 build:
90 context: ./nginx
91 args:
92 - PHP_UPSTREAM=php-fpm
93 volumes_from:
94 - applications
95 volumes:
96 - ${NGINX_HOST_LOG_PATH}:/var/log/nginx
97 - ${NGINX_SITES_PATH}:/etc/nginx/sites-available
98 ports:
99 - "${NGINX_HOST_HTTP_PORT}:80"
100 - "${NGINX_HOST_HTTPS_PORT}:443"
101 depends_on:
102 - php-fpm
103 environment:
104 - VIRTUAL_HOST=gamurs.app
105
106### Apache Server Container #################################
107
108# apache2:
109# build:
110# context: ./apache2
111# args:
112# - PHP_SOCKET=${PHP_SOCKET}
113# volumes_from:
114# - applications
115# volumes:
116# - ${APACHE_HOST_LOG_PATH}:/var/log/apache2
117# - ./apache2/sites:/etc/apache2/sites-available
118#
119#
120# ports:
121# - "${APACHE_HOST_HTTP_PORT}:80"
122# - "${APACHE_HOST_HTTPS_PORT}:443"
123# depends_on:
124# - php-fpm
125
126### HHVM Container ##########################################
127
128# hhvm:
129# build: ./hhvm
130# volumes_from:
131# - applications
132# expose:
133# - "9000"
134# depends_on:
135# - workspace
136
137### Minio Container #########################################
138
139# minio:
140# build: ./minio
141# volumes:
142# - minio:/export
143# ports:
144# - "${MINIO_PORT}:9000"
145# environment:
146# MINIO_ACCESS_KEY: access
147# MINIO_SECRET_KEY: secretkey
148
149### MySQL Container #########################################
150
151 mysql:
152 build:
153 context: ./mysql
154 args:
155 - MYSQL_DATABASE=${MYSQL_DATABASE}
156 - MYSQL_USER=${MYSQL_USER}
157 - MYSQL_PASSWORD=${MYSQL_PASSWORD}
158 - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
159 volumes:
160 - mysql:/var/lib/mysql
161 ports:
162 - "${MYSQL_PORT}:3306"
163
164### MariaDB Container #######################################
165
166# mariadb:
167# build: ./mariadb
168# volumes:
169# - mariadb:/var/lib/mysql
170# ports:
171# - "${MARIADB_PORT}:3306"
172# environment:
173# MYSQL_DATABASE: ${MARIADB_DATABASE}
174# MYSQL_USER: ${MARIADB_USER}
175# MYSQL_PASSWORD: ${MARIADB_PASSWORD}
176# MYSQL_ROOT_PASSWORD: ${MARIADB_PORT}
177
178### PostgreSQL Container ####################################
179
180# postgres:
181# build: ./postgres
182# volumes:
183# - postgres:/var/lib/postgresql/data
184# ports:
185# - "${POSTGRES_PORT}:5432"
186# environment:
187# POSTGRES_DB: ${POSTGRES_DB}
188# POSTGRES_USER: ${POSTGRES_USER}
189# POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
190
191### PostgreSQL PostGis Container ############################
192#
193# postgres-postgis:
194# build: ./postgres-postgis
195# volumes:
196# - postgres:/var/lib/postgresql/data
197# ports:
198# - "${POSTGRES_PORT}:5432"
199# environment:
200# POSTGRES_DB: ${POSTGRES_DB}
201# POSTGRES_USER: ${POSTGRES_USER}
202# POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
203#
204#### Neo4j Container #########################################
205#
206# neo4j:
207# build: ./neo4j
208# ports:
209# - "7474:7474"
210# - "1337:1337"
211# environment:
212# - NEO4J_AUTH=default:secret
213# volumes:
214# - neo4j:/var/lib/neo4j/data
215#
216#### MongoDB Container #######################################
217#
218# mongo:
219# build: ./mongo
220# ports:
221# - "27017:27017"
222# volumes:
223# - mongo:/data/db
224#
225#### RethinkDB Container #######################################
226#
227# rethinkdb:
228# build: ./rethinkdb
229# ports:
230# - "8090:8080"
231# volumes:
232# - rethinkdb:/data/rethinkdb_data
233
234#### Redis Container #########################################
235#
236# redis:
237# build: ./redis
238# volumes:
239# - redis:/data
240# ports:
241# - "6379:6379"
242#
243#### Aerospike c Container ###################################
244#
245# aerospike:
246# build: ./aerospike
247# volumes_from:
248# - workspace
249# volumes:
250# - aerospike:/opt/aerospike/data
251# ports:
252# - "3000:3000"
253# - "3001:3001"
254# - "3002:3002"
255# - "3003:3003"
256
257
258### Memcached Container #####################################
259
260 memcached:
261 build: ./memcached
262 volumes:
263 - memcached:/var/lib/memcached
264 ports:
265 - "${MEMCACHED_HOST_PORT}:11211"
266 depends_on:
267 - php-fpm
268
269#### Beanstalkd Container ####################################
270#
271# beanstalkd:
272# build: ./beanstalkd
273# ports:
274# - "${BEANSTALKD_HOST_PORT}:11300"
275# privileged: true
276# depends_on:
277# - php-fpm
278#
279#### RabbitMQ Container ######################################
280#
281# rabbitmq:
282# build: ./rabbitmq
283# ports:
284# - "${RABBITMQ_NODE_HOST_PORT}:5672"
285# - "${RABBITMQ_MANAGEMENT_HTTP_HOST_PORT}:15672"
286# - "${RABBITMQ_MANAGEMENT_HTTPS_HOST_PORT}:15671"
287# privileged: true
288# environment:
289# RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
290# RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
291# depends_on:
292# - php-fpm
293#
294#### Beanstalkd Console Container ############################
295#
296# beanstalkd-console:
297# build: ./beanstalkd-console
298# ports:
299# - "2080:2080"
300# depends_on:
301# - beanstalkd
302#
303#### Caddy Server Container ##################################
304#
305# caddy:
306# build: ./caddy
307# ports:
308# - "80:80"
309# - "443:443"
310# - "2015:2015"
311# volumes_from:
312# - applications
313# volumes:
314# - ./caddy/Caddyfile:/etc/Caddyfile
315# - ./logs/caddy:/var/log/caddy
316# - caddy:/root/.caddy
317# depends_on:
318# - php-fpm
319
320#### phpMyAdmin Container ####################################
321#
322# phpmyadmin:
323# build: ./phpmyadmin
324# environment:
325# PMA_ARBITRARY: 1
326# MYSQL_USER: ${PMA_USER}
327# MYSQL_PASSWORD: ${PMA_PASSWORD}
328# MYSQL_ROOT_PASSWORD: ${PMA_ROOT_PASSWORD}
329# ports:
330# - "${PMA_PORT}:80"
331# depends_on:
332# - "${PMA_DB_ENGINE}"
333#
334#### pgAdmin Container #######################################
335#
336# pgadmin:
337# build: ./pgadmin
338# ports:
339# - "5050:5050"
340# depends_on:
341# - postgres
342#
343#### ElasticSearch Container #################################
344#
345 elasticsearch:
346 build: ./elasticsearch
347 volumes:
348 - elasticsearch-data:/usr/share/elasticsearch/data
349 - elasticsearch-plugins:/usr/share/elasticsearch/plugins
350 ports:
351 - "${ELASTICSEARCH_HOST_HTTP_PORT}:9200"
352 - "${ELASTICSEARCH_HOST_TRANSPORT_PORT}:9300"
353 depends_on:
354 - php-fpm
355#
356#### Certbot Container ##################################
357#
358# certbot:
359# build:
360# context: ./certbot
361# volumes:
362# - ./data/certbot/certs/:/var/certs
363# - ./certbot/letsencrypt/:/var/www/letsencrypt
364# environment:
365# CN: "fake.domain.com"
366# EMAIL: "fake.email@gmail.com"
367#
368#### Mailhog Container #########################################
369#
370# mailhog:
371# build: ./mailhog
372# ports:
373# - "1025:1025"
374# - "8025:8025"
375#
376#### Selenium Container #########################################
377#
378# selenium:
379# build: ./selenium
380# ports:
381# - "${SELENIUM_PORT}:4444"
382# volumes:
383# - /dev/shm:/dev/shm
384
385### Volumes Setup ###########################################
386
387volumes:
388 mysql:
389 driver: "local"
390# postgres:
391# driver: "local"
392 memcached:
393 driver: "local"
394# redis:
395# driver: "local"
396# neo4j:
397# driver: "local"
398# mariadb:
399# driver: "local"
400# mongo:
401# driver: "local"
402# minio:
403# driver: "local"
404# rethinkdb:
405# driver: "local"
406# phpmyadmin:
407# driver: "local"
408# aerospike:
409# driver: "local"
410# caddy:
411# driver: "local"
412 elasticsearch-data:
413 driver: "local"
414 elasticsearch-plugins:
415 driver: "local"