forked from mollie/WooCommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
291 lines (266 loc) · 9.03 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
version: "3"
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
ports:
- "53306:3306"
volumes:
# - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
- wpdb:/var/lib/mysql # I want to manage volumes manually.
php:
image: wodby/wordpress-php:$PHP_TAG
container_name: "${PROJECT_NAME}_php"
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
DB_HOST: $DB_HOST
DB_USER: $DB_USER
DB_PASSWORD: $DB_PASSWORD
DB_NAME: $DB_NAME
PHP_FPM_USER: wodby
PHP_FPM_GROUP: wodby
## Read instructions at https://wodby.com/stacks/wordpress/docs/local/xdebug/
# PHP_XDEBUG: 1
# PHP_XDEBUG_DEFAULT_ENABLE: 1
# PHP_XDEBUG_REMOTE_CONNECT_BACK: 0
# PHP_IDE_CONFIG: serverName=my-ide
# PHP_XDEBUG_REMOTE_HOST: 172.17.0.1 # Linux
# PHP_XDEBUG_REMOTE_HOST: 10.254.254.254 # macOS
# PHP_XDEBUG_REMOTE_HOST: 10.0.75.1 # Windows
volumes:
- ${BASE_DIR}/docker/.htaccess:${DOCROOT}/.htaccess
- ${BASE_DIR}/docker/wp.sh:/opt/wp.sh
- ${BASE_DIR}/docker/wp-config.php:${DOCROOT}/wp-config.php
- ${BASE_DIR}/vendor/johnpbloch/wordpress-core:${DOCROOT}
- ${BASE_DIR}:${PROJECT_MOUNT_PATH}
- ${BASE_DIR}/vendor/woocommerce/woocommerce:${DOCROOT}/wp-content/plugins/woocommerce
- ${BASE_DIR}/vendor/woocommerce/woocommerce-blocks:${DOCROOT}/wp-content/plugins/woocommerce-blocks
- ${BASE_DIR}/vendor/woocommerce/woocommerce-rest-api:${DOCROOT}/wp-content/plugins/woocommerce-rest-api
## For macOS users (https://wodby.com/stacks/wordpress/docs/local/docker-for-mac/)
# - ./:/var/www/html:cached # User-guided caching
# - docker-sync:/var/www/html # Docker-sync
## For XHProf and Xdebug profiler traces
# - files:/mnt/files
composer:
image: composer
container_name: "${PROJECT_NAME}_composer"
volumes:
- ${BASE_DIR}:/app
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_VHOST_PRESET: wordpress
#NGINX_SERVER_ROOT: /var/www/html/subdir
volumes:
- ${BASE_DIR}/docker/.htaccess:${DOCROOT}/.htaccess
- ${BASE_DIR}/docker/wp-config.php:${DOCROOT}/wp-config.php
- ${BASE_DIR}/vendor/johnpbloch/wordpress-core:${DOCROOT}
- ${BASE_DIR}:${PROJECT_MOUNT_PATH}
- ${BASE_DIR}/vendor/woocommerce/woocommerce:${DOCROOT}/wp-content/plugins/woocommerce
# Options for macOS users (https://wodby.com/stacks/wordpress/docs/local/docker-for-mac/)
# - ./:/var/www/html:cached # User-guided caching
# - docker-sync:/var/www/html # Docker-sync
labels:
- 'traefik.backend=${PROJECT_NAME}_nginx'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:${PROJECT_BASE_URL}'
mailhog:
image: mailhog/mailhog
container_name: "${PROJECT_NAME}_mailhog"
labels:
- 'traefik.backend=${PROJECT_NAME}_mailhog'
- 'traefik.port=8025'
- 'traefik.frontend.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
# volumes:
# - ./postgres-init:/docker-entrypoint-initdb.d # Place init file(s) here.
# - /path/to/postgres/data/on/host:/var/lib/postgresql/data # I want to manage volumes manually.
# 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
# volumes:
# - ./:/var/www/html
## For macOS users (https://wodby.com/stacks/wordpress/docs/local/docker-for-mac/)
## - ./:/var/www/html:cached # User-guided caching
## - docker-sync:/var/www/html # Docker-sync
# labels:
# - 'traefik.backend=${PROJECT_NAME}_apache'
# - 'traefik.port=80'
# - 'traefik.frontend.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: wordpress
# VARNISH_ALLOW_UNRESTRICTED_PURGE: 1
# labels:
# - 'traefik.backend=${PROJECT_NAME}_varnish'
# - 'traefik.port=6081'
# - 'traefik.frontend.rule=Host:varnish.${PROJECT_BASE_URL}'
# redis:
# container_name: "${PROJECT_NAME}_redis"
# image: wodby/redis:$REDIS_TAG
# 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.backend=${PROJECT_NAME}_adminer'
# - 'traefik.port=9000'
# - 'traefik.frontend.rule=Host:adminer.${PROJECT_BASE_URL}'
# webgrind:
# image: wodby/webgrind:$WEBGRIND_TAG
# container_name: "${PROJECT_NAME}_webgrind"
# environment:
# WEBGRIND_PROFILER_DIR: /mnt/files/xdebug/profiler
# labels:
# - 'traefik.backend=${PROJECT_NAME}_webgrind'
# - 'traefik.port=8080'
# - 'traefik.frontend.rule=Host:webgrind.${PROJECT_BASE_URL}'
# volumes:
# - files:/mnt/files
# pma:
# image: phpmyadmin/phpmyadmin
# container_name: "${PROJECT_NAME}_pma"
# environment:
# PMA_HOST: $DB_HOST
# PMA_USER: $DB_USER
# PMA_PASSWORD: $DB_PASSWORD
# PHP_UPLOAD_MAX_FILESIZE: 1G
# PHP_MAX_INPUT_VARS: 1G
# labels:
# - 'traefik.backend=${PROJECT_NAME}_pma'
# - 'traefik.port=80'
# - 'traefik.frontend.rule=Host:pma.${PROJECT_BASE_URL}'
# 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"
# blackfire:
# image: blackfire/blackfire
# container_name: "${PROJECT_NAME}_blackfire"
# environment:
# BLACKFIRE_SERVER_ID: XXXXX
# BLACKFIRE_SERVER_TOKEN: YYYYY
# solr:
# image: wodby/solr:$SOLR_TAG
# container_name: "${PROJECT_NAME}_solr"
# environment:
# SOLR_HEAP: 1024m
# labels:
# - 'traefik.backend=${PROJECT_NAME}_solr'
# - 'traefik.port=8983'
# - 'traefik.frontend.rule=Host:solr.${PROJECT_BASE_URL}'
# elasticsearch:
# image: wodby/elasticsearch:$ELASTICSEARCH_TAG
# environment:
# ES_JAVA_OPTS: "-Xms500m -Xmx500m"
# ulimits:
# memlock:
# soft: -1
# hard: -1
# kibana:
# image: wodby/kibana:$KIBANA_TAG
# depends_on:
# - elasticsearch
# labels:
# - 'traefik.backend=${PROJECT_NAME}_kibana'
# - 'traefik.port=5601'
# - 'traefik.frontend.rule=Host:kibana.php.docker.localhost'
# node:
# image: wodby/node:$NODE_TAG
# container_name: "${PROJECT_NAME}_node"
# working_dir: /app
# labels:
# - 'traefik.backend=${PROJECT_NAME}_node'
# - 'traefik.port=3000'
# - 'traefik.frontend.rule=Host:front.${PROJECT_BASE_URL}'
# expose:
# - "3000"
# volumes:
# - ./path/to/your/single-page-app:/app
# command: sh -c 'npm install && npm run start'
# memcached:
# container_name: "${PROJECT_NAME}_memcached"
# image: wodby/memcached:$MEMCACHED_TAG
# opensmtpd:
# container_name: "${PROJECT_NAME}_opensmtpd"
# image: wodby/opensmtpd:$OPENSMTPD_TAG
# rsyslog:
# container_name: "${PROJECT_NAME}_rsyslog"
# image: wodby/rsyslog:$RSYSLOG_TAG
# xhprof:
# image: wodby/xhprof:$XHPROF_TAG
# restart: always
# volumes:
# - files:/mnt/files
# labels:
# - 'traefik.backend=${PROJECT_NAME}_xhprof'
# - 'traefik.port=8080'
# - 'traefik.frontend.rule=Host:xhprof.${PROJECT_BASE_URL}'
portainer:
image: portainer/portainer
container_name: "${PROJECT_NAME}_portainer"
command: --no-auth -H unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
- 'traefik.backend=${PROJECT_NAME}_portainer'
- 'traefik.port=9000'
- 'traefik.frontend.rule=Host:portainer.${PROJECT_BASE_URL}'
traefik:
image: traefik
container_name: "${PROJECT_NAME}_traefik"
command: -c /dev/null --web --docker --logLevel=INFO
ports:
- '80:80'
# - '8080:8080' # Dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
## Docker-sync for macOS users
# docker-sync:
# external: true
## For Xdebug profiler
# files:
wpdb: