-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
276 lines (251 loc) · 7.67 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
version: "3.4"
x-php-environment: &php-environnement
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
DB_HOST: $DB_HOST
DB_USER: root
DB_PASSWORD: $DB_ROOT_PASSWORD
DB_DRIVER: $DB_DRIVER
MYSQL_PWD: $DB_ROOT_PASSWORD
MYSQL_HOST: $DB_HOST
PHP_FPM_USER: wodby
PHP_FPM_GROUP: wodby
PHP_DATE_TIMEZONE: Europe/Paris
COLUMNS: 80 # Set 80 columns for docker exec -it.
# Read instructions at https://wodby.com/docs/stacks/php/local/#xdebug
PHP_IDE_CONFIG: serverName=cli
PHP_XDEBUG: 1
PHP_XDEBUG_DEFAULT_ENABLE: 1
PHP_XDEBUG_IDEKEY: ide
PHP_XDEBUG_REMOTE_AUTOSTART: 1
PHP_XDEBUG_MAX_NESTING_LEVEL: 9999
# Xdebug 3
PHP_XDEBUG_MODE: "develop,debug"
PHP_XDEBUG_START_WITH_REQUEST: "yes"
PHP_XDEBUG_LOG: /tmp/php-xdebug.log
PHP_XDEBUG_LOG_LEVEL: 7
# In the following two variables, if "remote connect back" is set to 1, then
# we don't have to specify remote host when there is a HTTP request, because
# the server knows where did the request come from. However it does not work
# in micro services when an application sends a HTTP request to another and we
# want to debug both requests. Neither for CLI debugging running inside a PHP
# container as there is nothing initiated from the host (where the IDE is).
# In a Linux host, the IP is 172.17.0.1 (seen from the PHP container). It
# might be the same for other environments.
PHP_XDEBUG_REMOTE_CONNECT_BACK: 0
PHP_XDEBUG_REMOTE_HOST: 172.17.0.1
PHP_XDEBUG_REMOTE_LOG: /tmp/php-xdebug.log
PHP_XHPROF: 1
XDG_CONFIG_HOME: /var/www/cache
HISTFILE: /var/www/cache/.bash_history
CACHE_PREFIX: /var/www/cache
x-php-volumes: &php-volumes
- $DOCKER_PATH_WEB:/var/www
- $DOCKER_PATH_WEB/cache:/mnt/files
- $SSH_AUTH_SOCK:/ssh-agent
- $DOCKER_PATH_WEB/conf/ca-certificates:/usr/local/share/ca-certificates
- $DOCKER_PATH_WEB/conf/drush-module:/home/wodby/.drush/modules
x-php-base: &php-base
environment: *php-environnement
volumes: *php-volumes
labels:
- traefik.enable=false
services:
mariadb:
image: wodby/mariadb:$MARIADB_TAG
container_name: drupal_mariadb
stop_grace_period: 30s
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_INTERACTIVE_TIMEOUT: $MYSQL_INTERACTIVE_TIMEOUT
MYSQL_WAIT_TIMEOUT: $MYSQL_WAIT_TIMEOUT
labels:
- traefik.enable=false
volumes:
- $DOCKER_PATH_VOLUMES/mysql:/var/lib/mysql
postgres:
image: postgres:13
container_name: drupal_postgres
environment:
POSTGRES_PASSWORD: $DB_ROOT_PASSWORD
labels:
- traefik.enable=false
php5.6:
<<: *php-base
build:
context: ./php
dockerfile: Dockerfile56
container_name: drupal_php56
# php7.0:
# <<: *php-base
# build:
# context: ./php
# dockerfile: Dockerfile70
# container_name: drupal_php70
php7.1:
<<: *php-base
build:
context: ./php
dockerfile: Dockerfile71
container_name: drupal_php71
# php7.2:
# <<: *php-base
# build:
# context: ./php
# args:
# PHP_VERSION: 7.2
# container_name: drupal_php72
php7.3:
<<: *php-base
build:
context: ./php
args:
PHP_VERSION: 7.3
container_name: drupal_php73
php7.4:
<<: *php-base
build:
context: ./php
args:
PHP_VERSION: 7.4
container_name: drupal_php74
php8.0:
<<: *php-base
build:
context: ./php
args:
PHP_VERSION: 8.0
container_name: drupal_php80
mailhog:
image: mailhog/mailhog
container_name: drupal_mailhog
labels:
- "traefik.http.services.drupal_mailhog.loadbalancer.server.port=8025"
- "traefik.http.routers.drupal_mailhog.rule=Host(`mailhog.$DOCKER_HOST_LOCAL`)"
adminer:
image: adminer
container_name: drupal_adminer
labels:
- "traefik.http.routers.drupal_adminer.rule=Host(`adminer.$DOCKER_HOST_LOCAL`)"
pma:
image: phpmyadmin/phpmyadmin:5
container_name: drupal_pma
environment:
PMA_HOST: $DB_HOST
PMA_USER: root
PMA_PASSWORD: $DB_ROOT_PASSWORD
PHP_UPLOAD_MAX_FILESIZE: 1G
PHP_MAX_INPUT_VARS: 1G
labels:
- "traefik.http.routers.drupal_pma.rule=Host(`pma.$DOCKER_HOST_LOCAL`)"
volumes:
- ./phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
solr8:
image: solr:8
container_name: "drupal_solr8"
labels:
- "traefik.http.routers.drupal_solr8.rule=Host(`solr8.$DOCKER_HOST_LOCAL`)"
volumes:
- $DOCKER_PATH_WEB:/var/www
- $DOCKER_PATH_WEB/cache/solr8.cores:/var/solr/data
solr6:
image: solr:6
container_name: "drupal_solr6"
labels:
- "traefik.http.routers.drupal_solr6.rule=Host(`solr6.$DOCKER_HOST_LOCAL`)"
volumes:
- $DOCKER_PATH_WEB:/var/www
- $DOCKER_PATH_WEB/cache/solr6.cores:/opt/solr/server/solr/mycores
solr5:
image: solr:5
container_name: "drupal_solr5"
labels:
- "traefik.http.routers.drupal_solr5.rule=Host(`solr5.$DOCKER_HOST_LOCAL`)"
volumes:
- $DOCKER_PATH_WEB:/var/www
- $DOCKER_PATH_WEB/cache/solr5.cores:/opt/solr/server/solr/mycores
solr4:
image: geerlingguy/solr:4.x
container_name: "drupal_solr4"
labels:
- "traefik.http.routers.drupal_solr4.rule=Host(`solr4.$DOCKER_HOST_LOCAL`)"
expose:
- "8983"
volumes:
- $DOCKER_PATH_WEB:/var/www
- $DOCKER_PATH_WEB/cache/solr4.cores:/opt/solr/example/solr/mycores
memcached:
container_name: "drupal_memcached"
image: memcached:1-alpine
labels:
- traefik.enable=false
redis:
container_name: drupal_redis
image: redis:6-alpine
labels:
- traefik.enable=false
node:
build: ./node
container_name: "drupal_node"
labels:
- traefik.enable=false
volumes:
- $DOCKER_PATH_WEB:/var/www
ruby:
build: ./ruby
container_name: "drupal_ruby"
labels:
- traefik.enable=false
volumes:
- $DOCKER_PATH_WEB:/var/www
xhprof:
build:
context: ./xhprof
args:
XHPROF_VER: 2.3.5
container_name: drupal_xhprof
restart: always
volumes:
- $DOCKER_PATH_WEB/cache:/mnt/files
labels:
- "traefik.http.routers.drupal_xhprof.rule=Host(`xhprof.$DOCKER_HOST_LOCAL`)"
apache:
build: './apache/'
container_name: "drupal_apache"
depends_on:
- php5.6
- php7.4
labels:
- traefik.http.routers.drupal_apache_https.rule=HostRegexp(`{subdomain:.+}.$DOCKER_HOST_LOCAL`)
- traefik.http.routers.drupal_apache_https.tls=true
- traefik.http.routers.drupal_apache_https.entrypoints=websecure
- traefik.http.routers.drupal_apache_https.priority=-1
- traefik.http.routers.drupal_apache_http.rule=HostRegexp(`{subdomain:.+}.$DOCKER_HOST_LOCAL`)
- traefik.http.routers.drupal_apache_http.entrypoints=web
- traefik.http.routers.drupal_apache_http.priority=-1
volumes:
- $DOCKER_PATH_WEB:/var/www
portainer:
image: portainer/portainer:1.24.2-alpine
container_name: "drupal_portainer"
command: --no-auth -H unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
- traefik.http.routers.drupal_portainer.rule=Host(`portainer.$DOCKER_HOST_LOCAL`)
traefik:
image: traefik:v2.5
container_name: "drupal_traefik"
command:
- --api.insecure=true
- --providers.docker
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --providers.file.directory=/etc/traefik/dynamic_conf
ports:
- '127.0.0.1:80:80'
- '127.0.0.1:8080:8080'
- '127.0.0.1:443:443'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik/config.yml:/etc/traefik/dynamic_conf/conf.yml:ro
- ./apache/ssl/certs:/etc/certs:ro