-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
executable file
·302 lines (284 loc) · 7.17 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
version: "2"
services:
################ LAMP Stack.
php-fpm:
# Pls, check image tags, latest is php-7, but we have php-5 too.
# build: docker/images/php-fpm/.
image: lordius/alpine-php_fpm
# image: lordius/alpine-php_fpm:php-5
# image: lordius/alpine-php_fpm:php-7
links:
- mailhog
- mariadb
- postgres
- mongo
# - redis
# - memcached
# - solr
depends_on:
- mailhog
- mariadb
- postgres
- mongo
# - redis
# - memcached
# - solr
volumes:
- ./crontasks.txt:/home/crontasks.txt
- ./htdocs:/var/www/localhost/htdocs
# Attach sample configs if necessary.
# - ./docker/runtime/php7:/temp_configs_dir/php7
# - ./docker/runtime/php5:/temp_configs_dir/php5
environment:
DRUSH_VERSION: 8.x
PHP_SHOW_ERRORS: 1
CRONTAB_ENABLED: 0
PHP_FPM_PORT: 7000
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -i -t
PHP_SENDMAIL_HOST: mailhog
PHP_SENDMAIL_PORT: 1025
PHP_XDEBUG_ENABLED: 1
PHP_XDEBUG_PORT: 9000
PHP_MAX_EXECUTION_TIME: 250
PHP_UPLOAD_MAX_FILESIZE: 1024M
PHP_POST_MAX_SIZE: 756M
PHP_ALLOW_URL_FOPEN: "On"
PHP_ALWAYS_POPULATE_RAW_POST_DATA: -1
PHP_SHORT_OPEN_TAG: 1
PHP_MEMORY_LIMIT: 1024M
networks:
internal:
shared:
ipv4_address: 172.55.0.2
extra_hosts:
- "site.dockerlamp:172.55.0.4"
apache2_mpm:
image: lordius/alpine-apache
links:
- php-fpm
depends_on:
- php-fpm
# Attach sample configs if necessary.
# volumes:
# - ./docker/runtime/apache2:/temp_configs_dir/apache2
volumes_from:
- php-fpm
environment:
APACHE_TIMEOUT: 300
DOCUMENT_ROOT: /var/www/localhost/htdocs
PROXY_PASS: fcgi://php-fpm:7000/var/www/localhost/htdocs
APACHE_LISTEN_PORT: 80
ports:
- '80:80'
networks:
internal:
shared:
ipv4_address: 172.55.0.3
nginx:
image: lordius/alpine-nginx
links:
- apache2_mpm
depends_on:
- apache2_mpm
# Attach sample configs if necessary.
# volumes:
# - ./docker/runtime/nginx:/temp_configs_dir/nginx
volumes_from:
- php-fpm
environment:
KEEPALIVE_TIMEOUT: 3000
LISTEN_PORT: 80
SERVER_ROOT: /var/www/localhost/htdocs
SERVER_NAME: localhost
CLIENT_MAX_BODY_SIZE: 32m
PROXY_CONNECT_TIMEOUT: 3000
PROXY_SEND_TIMEOUT: 3000
PROXY_READ_TIMEOUT: 3000
SEND_TIMEOUT: 3000
PROXY_PASS: http://apache2_mpm:80
ports:
- '81:80'
networks:
internal:
shared:
ipv4_address: 172.55.0.4
################ Node stack.
# node:
# image: node:alpine
# links:
# - mongo
# depends_on:
# - mongo
# environment:
# - NODE_ENV=production
# volumes:
# - ./htdocs:/usr/src/app
# working_dir: /usr/src/app
# expose:
# - "3000"
# # You could use any command to running. Or run without any command and execute code inside image.
# # E.g: `docker exec -it dockercomposelamp_node_1 ash` and then inside container go to `/usr/src/app` and run node.
# # command: ash -c "PORT=3000 DEBUG=htdocs:* npm start"
# command: ash -c "PORT=3000 node server.js"
# networks:
# internal:
# shared:
# ipv4_address: 172.55.0.5
################ Extra toolkit images.
# **MailHog** is available under **http://172.55.0.6:8025**
mailhog:
image: mailhog/mailhog
networks:
internal:
shared:
ipv4_address: 172.55.0.6
ports:
- '85:8025'
# **NGROK** is available under **http://172.55.0.7:4040**
ngrok:
image: lordius/alpine-ngrok
environment:
# Here must be your container IP accesable from browser.
#ARGS: http 172.53.0.4:80
# For this LAMP stack in a virtualbox VM with NAT network...
ARGS: http 10.0.2.15:81
ports:
- '84:4040'
networks:
shared:
ipv4_address: 172.55.0.7
# solr:
# image: solr:6-alpine
# volumes:
# # Example of drupal solr core configuration. 6.x. Check image tag for correct config.
# - ./docker/runtime/solr:/opt/solr/server/solr/mycores
# entrypoint:
# - docker-entrypoint.sh
# - solr-precreate
# - drupal_6x_core
# networks:
# internal:
# shared:
# ipv4_address: 172.55.0.8
################ DB managers.
# Requires mariadb container.
phpmyadmin:
image: phpmyadmin/phpmyadmin
links:
- mariadb
depends_on:
- mariadb
environment:
PMA_HOST: mariadb
PHP_UPLOAD_MAX_FILESIZE: 1G
PHP_MAX_INPUT_VARS: 1G
ports:
- '82:80'
networks:
internal:
shared:
ipv4_address: 172.55.0.9
adminer:
image: adminer
links:
- mariadb
- postgres
- mongo
depends_on:
- mariadb
- postgres
- mongo
ports:
#- '83:80'
- '83:8080'
restart: always
networks:
internal:
shared:
ipv4_address: 172.55.0.10
################ Database images.
mariadb:
image: yobasystems/alpine-mariadb
# build: docker/images/mysql/.
volumes:
- ./docker/runtime/mysql/lib:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: testdrive
MYSQL_PASSWORD: testdrive
MYSQL_DATABASE: testdrive
# command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci # The simple way to override the mariadb config.
ports:
- '3306:3306'
networks:
- internal
postgres:
image: postgres:alpine
restart: always
environment:
POSTGRES_PASSWORD: testdrive
POSTGRES_USER: testdrive
POSTGRES_DB: testdrive
volumes:
- ./docker/runtime/postgres/data:/var/lib/postgresql/data
networks:
- internal
mongo:
image: mvertes/alpine-mongo
volumes:
- ./docker/runtime/mongo:/var/lib/mongodb
#- ./docker/runtime/mongo:/data/db
restart: always
command: mongod --smallfiles --logpath=/dev/null # --quiet
networks:
- internal
################ Cache-memory images.
# redis:
# image: redis:alpine
# networks:
# - internal
# memcached:
# image: memcached:alpine
# networks:
# - internal
################ Selenium image configuration and php-fpm-data as proxy container for selenium.
# php-fpm-data:
# image: lordius/alpine-php_fpm
# networks:
# - internal
# selenium:
# image: selenium/standalone-firefox-debug:2.48.2
# links:
# - php-fpm
# ports:
# - "4444"
# - "5900"
# cap_add:
# - NET_ADMIN
# - NET_RAW
# networks:
# shared:
# ipv4_address: 172.55.0.11
portainer:
image: portainer/portainer
ports:
- '86:9000'
networks:
internal:
shared:
ipv4_address: 172.55.0.12
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
internal:
driver_opts:
internal: "true"
driver: bridge
shared:
driver_opts:
enable_ipv6: "true"
driver: bridge
ipam:
config:
- subnet: 172.55.0.0/16
gateway: 172.55.0.1