-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
382 lines (350 loc) · 11.6 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
version: "3.7"
services:
# mariadb:
# image: wodby/mariadb:$MARIADB_TAG
# container_name: "${PROJECT_NAME}_mariadb"
# stop_grace_period: 30s
# environment:
# MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
# MYSQL_DATABASE: $DB_NAME
# MYSQL_USER: $DB_USER
# MYSQL_PASSWORD: $DB_PASSWORD
# volumes:
# - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
# - /path/to/mariadb/data/on/host:/var/lib/mysql # Use bind mount
php:
image: wodby/drupal-php:$PHP_TAG
# container_name: "${PROJECT_NAME}_php"
environment:
PROJECT_ENVIRONMENT: dev
COMPOSER_AUTH: "${COMPOSER_AUTH}"
SSMTP_MAILHUB: mailhog:1025
# SSMTP_MAILHUB: opensmtpd:25
PHP_SENDMAIL_PATH: '"/usr/bin/dos2unix -u | /usr/sbin/ssmtp -t -f"'
PHP_POST_MAX_SIZE: 256M
PHP_UPLOAD_MAX_FILESIZE: 256M
PHP_MAX_EXECUTION_TIME: 300
PHP_FPM_REQUEST_SLOWLOG_TIMEOUT: 2s
# DB_HOST: $DB_HOST
# DB_PORT: $DB_PORT
# DB_USER: $DB_USER
# DB_PASSWORD: $DB_PASSWORD
# DB_NAME: $DB_NAME
# DB_DRIVER: $DB_DRIVER
# DRUSH_OPTIONS_URI: "http://${PROJECT_BASE_URL}:${PROJECT_PORT}"
# PHP_FPM_USER: wodby
# PHP_FPM_GROUP: wodby
# COLUMNS: 80 # Set 80 columns for docker exec -it.
# # Read instructions at https://wodby.com/docs/stacks/php/local/#xdebug
# PHP_XDEBUG: 1
PHP_XDEBUG_MODE: debug
PHP_XDEBUG_START_WITH_REQUEST: yes
# PHP_IDE_CONFIG: serverName=my-ide
# PHP_XDEBUG_IDEKEY: "my-ide"
# PHP_XDEBUG_CLIENT_HOST: 172.17.0.1 # Linux
PHP_XDEBUG_CLIENT_HOST: host.docker.internal # Docker 18.03+ Mac/Win
# PHP_XDEBUG_CLIENT_HOST: 10.0.75.1 # Windows, Docker < 18.03
PHP_XDEBUG_LOG: /tmp/php-xdebug.log
# # PHPUnit Drupal testing configurations
# SIMPLETEST_BASE_URL: "http://nginx"
# SIMPLETEST_DB: "${DB_DRIVER}://${DB_USER}:${DB_PASSWORD}@${DB_HOST}/${DB_NAME}#tests_"
# MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","goog:chromeOptions":{"args":["--disable-gpu","--headless"]}}, "http://chrome:9515"]'
volumes:
- ./src/:/var/www/html:cached
- ./.env:/var/www/html/.env
## Alternative for macOS users: Mutagen https://wodby.com/docs/stacks/drupal/local#docker-for-mac
# - drupal:/var/www/html
## For XHProf and Xdebug profiler traces
# - files:/mnt/files
extra_hosts:
- "host.docker.internal:host-gateway"
crond:
image: wodby/drupal-php:$PHP_TAG
# container_name: "${PROJECT_NAME}_crond"
environment:
CRONTAB: "0 * * * * drush -r /var/www/html/web cron"
command: sudo -E LD_PRELOAD=/usr/lib/preloadable_libiconv.so crond -f -d 0
volumes:
- ./src/:/var/www/html:cached
- ./.env:/var/www/html/.env
## Alternative for macOS users: Mutagen https://wodby.com/docs/stacks/drupal/local#docker-for-mac
# - drupal:/var/www/html
nginx:
image: wodby/nginx:$NGINX_TAG
# container_name: "${PROJECT_NAME}_nginx"
depends_on:
- php
environment:
NGINX_STATIC_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
NGINX_SERVER_ROOT: /var/www/html/web
NGINX_VHOST_PRESET: $NGINX_VHOST_PRESET
NGINX_CLIENT_MAX_BODY_SIZE: 256m
# NGINX_DRUPAL_FILE_PROXY_URL: http://example.com
volumes:
- ./src/:/var/www/html:cached
## Alternative for macOS users: Mutagen https://wodby.com/docs/stacks/drupal/local#docker-for-mac
# - drupal:/var/www/html
labels:
- "traefik.http.routers.${PROJECT_NAME}_nginx.rule=Host(`${PROJECT_BASE_URL}`)"
mailhog:
image: mailhog/mailhog
# container_name: "${PROJECT_NAME}_mailhog"
ports:
- "1025:1025"
- "8025:8025"
labels:
- "traefik.http.services.${PROJECT_NAME}_mailhog.loadbalancer.server.port=8025"
- "traefik.http.routers.${PROJECT_NAME}_mailhog.rule=Host(`mailhog.${PROJECT_BASE_URL}`)"
postgres:
image: wodby/postgres:$POSTGRES_TAG
# container_name: "${PROJECT_NAME}_postgres"
stop_grace_period: 30s
environment:
POSTGRES_PASSWORD: $DB_PASSWORD
POSTGRES_DB: $DB_NAME
POSTGRES_USER: $DB_USER
POSTGRES_DB_EXTENSIONS: pg_trgm
ports:
- "5432:5432"
volumes:
- ./src/scripts/postgres-init:/docker-entrypoint-initdb.d # Place init file(s) here.
- pgdata:/var/lib/postgresql/data # Use bind mount
# apache:
# image: wodby/apache:$APACHE_TAG
# container_name: "${PROJECT_NAME}_apache"
# depends_on:
# - php
# environment:
# APACHE_LOG_LEVEL: debug
# APACHE_BACKEND_HOST: php
# APACHE_VHOST_PRESET: php
# APACHE_DOCUMENT_ROOT: /var/www/html/web
# volumes:
# - ./:/var/www/html:cached
## Alternative for macOS users: Mutagen https://wodby.com/docs/stacks/drupal/local#docker-for-mac
# - drupal:/var/www/html
# labels:
# - "traefik.http.routers.${PROJECT_NAME}_apache.rule=Host(`${PROJECT_BASE_URL}`)"
# varnish:
# image: wodby/varnish:$VARNISH_TAG
# container_name: "${PROJECT_NAME}_varnish"
# depends_on:
# - nginx
# environment:
# VARNISH_SECRET: secret
# VARNISH_BACKEND_HOST: nginx
# VARNISH_BACKEND_PORT: 80
# VARNISH_CONFIG_PRESET: drupal
# VARNISH_ALLOW_UNRESTRICTED_PURGE: 1
# labels:
# - "traefik.http.services.${PROJECT_NAME}_varnish.loadbalancer.server.port=6081"
# - "traefik.http.routers.${PROJECT_NAME}_varnish.rule=Host(`varnish.${PROJECT_BASE_URL}`)"
redis:
# container_name: "${PROJECT_NAME}_redis"
image: wodby/redis:$REDIS_TAG
ports:
- "6379:6379"
# adminer:
# container_name: "${PROJECT_NAME}_adminer"
# image: wodby/adminer:$ADMINER_TAG
# environment:
# # For PostgreSQL:
# # ADMINER_DEFAULT_DB_DRIVER: pgsql
# ADMINER_DEFAULT_DB_HOST: $DB_HOST
# ADMINER_DEFAULT_DB_NAME: $DB_NAME
# labels:
# - "traefik.http.routers.${PROJECT_NAME}_adminer.rule=Host(`adminer.${PROJECT_BASE_URL}`)"
# pma:
# image: phpmyadmin/phpmyadmin
# container_name: "${PROJECT_NAME}_pma"
# environment:
# PMA_HOST: $DB_HOST
# PMA_USER: $DB_USER
# PMA_PASSWORD: $DB_PASSWORD
# UPLOAD_LIMIT: 1G
# labels:
# - "traefik.http.routers.${PROJECT_NAME}_pma.rule=Host(`pma.${PROJECT_BASE_URL}`)"
solr:
image: wodby/solr:$SOLR_TAG
# container_name: "${PROJECT_NAME}_solr"
ports:
- "8983:8983"
environment:
SOLR_DEFAULT_CONFIG_SET: workbc
# ZK_HOST: zookeeper:2181
SOLR_HEAP: 1024m
# depends_on:
# - zookeeper
labels:
- "traefik.http.services.${PROJECT_NAME}_solr.loadbalancer.server.port=8983"
- "traefik.http.routers.${PROJECT_NAME}_solr.rule=Host(`solr.${PROJECT_BASE_URL}`)"
volumes:
- solrdata:/opt/solr/server/solr/workbc_dev
- ./src/scripts/solr/workbc:/opt/solr/server/solr/configsets/workbc
# zookeeper:
# image: zookeeper:$ZOOKEEPER_TAG
# # container_name: "${PROJECT_NAME}_zookeeper"
# environment:
# ZOO_MY_ID: 1
# ZOO_SERVERS: server.1=zookeeper:2888:3888;2181
# ZOO_4LW_COMMANDS_WHITELIST: mntr, conf, ruok
# drupal-node:
# image: wodby/drupal-node:$DRUPAL_NODE_TAG
# container_name: "${PROJECT_NAME}_drupal_nodejs"
# labels:
# - "traefik.http.routers.${PROJECT_NAME}_drupal_node.rule=Host(`drupal_node.${PROJECT_BASE_URL}`)"
# environment:
# NODE_SERVICE_KEY: node-service-key
# memcached:
# container_name: "${PROJECT_NAME}_memcached"
# image: wodby/memcached:$MEMCACHED_TAG
# rsyslog:
# container_name: "${PROJECT_NAME}_rsyslog"
# image: wodby/rsyslog:$RSYSLOG_TAG
# athenapdf:
# image: arachnysdocker/athenapdf-service:$ATHENAPDF_TAG
# container_name: "${PROJECT_NAME}_athenapdf"
# environment:
# WEAVER_AUTH_KEY: weaver-auth-key
# WEAVER_ATHENA_CMD: "athenapdf -S"
# WEAVER_MAX_WORKERS: 10
# WEAVER_MAX_CONVERSION_QUEUE: 50
# WEAVER_WORKER_TIMEOUT: 90
# WEAVER_CONVERSION_FALLBACK: "false"
# node:
# image: wodby/node:$NODE_TAG
# container_name: "${PROJECT_NAME}_node"
# working_dir: /var/www/html/path/to/theme/to/build
# labels:
# - "traefik.http.services.${PROJECT_NAME}_node.loadbalancer.server.port=3000"
# - "traefik.http.routers.${PROJECT_NAME}_node.rule=Host(`node.${PROJECT_BASE_URL}`)"
# expose:
# - "3000"
# volumes:
# - ./:/var/www/html
# command: sh -c 'yarn install && yarn run start'
# blackfire:
# image: blackfire/blackfire
# container_name: "${PROJECT_NAME}_blackfire"
# environment:
# BLACKFIRE_SERVER_ID: XXXXX
# BLACKFIRE_SERVER_TOKEN: YYYYY
# webgrind:
# image: wodby/webgrind:$WEBGRIND_TAG
# container_name: "${PROJECT_NAME}_webgrind"
# environment:
# WEBGRIND_PROFILER_DIR: /mnt/files/xdebug
# labels:
# - "traefik.http.routers.${PROJECT_NAME}_webgrind.rule=Host(`webgrind.${PROJECT_BASE_URL}`)"
# volumes:
# - files:/mnt/files
# elasticsearch:
# image: wodby/elasticsearch:$ELASTICSEARCH_TAG
# container_name: "${PROJECT_NAME}_elasticsearch"
# environment:
# ES_JAVA_OPTS: "-Xms500m -Xmx500m"
# ulimits:
# memlock:
# soft: -1
# hard: -1
# kibana:
# image: wodby/kibana:$KIBANA_TAG
# container_name: "${PROJECT_NAME}_kibana"
# depends_on:
# - elasticsearch
# labels:
# - "traefik.http.services.${PROJECT_NAME}_kibana.loadbalancer.server.port=5601"
# - "traefik.http.routers.${PROJECT_NAME}_kibana.rule=Host(`kibana.${PROJECT_BASE_URL}`)"
# opensmtpd:
# container_name: "${PROJECT_NAME}_opensmtpd"
# image: wodby/opensmtpd:$OPENSMTPD_TAG
# xhprof:
# image: wodby/xhprof:$XHPROF_TAG
# container_name: "${PROJECT_NAME}_xhprof"
# restart: always
# volumes:
# - files:/mnt/files
# labels:
# - "traefik.http.routers.${PROJECT_NAME}_xhprof.rule=Host(`xhprof.${PROJECT_BASE_URL}`)"
# chrome:
# image: selenium/standalone-chrome:$SELENIUM_CHROME_TAG
# container_name: "${PROJECT_NAME}_chrome"
# volumes:
# - /dev/shm:/dev/shm
# entrypoint:
# - chromedriver
# - "--no-sandbox"
# - "--disable-dev-shm-usage"
# - "--log-path=/tmp/chromedriver.log"
# - "--verbose"
# - "--whitelisted-ips="
traefik:
image: traefik:v2.0
# container_name: "${PROJECT_NAME}_traefik"
command: --api.insecure=true --providers.docker
ports:
- "${PROJECT_PORT}:80"
# - '8080:8080' # Dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock
#x-mutagen:
# sync:
# defaults:
# ignore:
# vcs: true
# paths:
# - .DS_Store
# - .history
# - .idea
# drupal:
# alpha: "."
# beta: "volume://drupal"
# configurationBeta:
# permissions:
# defaultFileMode: 0644
# defaultDirectoryMode: 0755
# defaultOwner: "id:501"
# defaultGroup: "id:20"
ssot:
image: postgrest/postgrest
# container_name: "${PROJECT_NAME}_ssot_api"
ports:
- "3000:3000"
environment:
PGRST_DB_URI: postgres://workbc:workbc@postgres:5432/ssot
PGRST_DB_SCHEMA: public
PGRST_DB_ANON_ROLE: ssot_lmmu
PGRST_OPENAPI_SERVER_PROXY_URI: http://localhost:3000
depends_on:
- postgres
swagger:
image: swaggerapi/swagger-ui
# container_name: "${PROJECT_NAME}_ssot_swagger"
ports:
- "8080:8080"
environment:
API_URL: http://localhost:3000/
depends_on:
- ssot
# test:
# build:
# context: ./src/scripts/test
# # container_name: "${PROJECT_NAME}_test"
# network_mode: host
# stdin_open: true
# tty: true
# ports:
# - "8089:8089"
# environment:
# BASE_URL: http://workbc.docker.localhost:8000
# volumes:
# - ./src/scripts/test:/app:cached
volumes:
pgdata:
solrdata:
## For macOS users (Mutagen)
# drupal:
## For Xdebug profiler
# files: