This repository was archived by the owner on Mar 27, 2026. It is now read-only.
forked from ho-nl/docker-development-box
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
108 lines (100 loc) · 3.89 KB
/
Copy pathdocker-compose.yml
File metadata and controls
108 lines (100 loc) · 3.89 KB
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
version: '3'
# Reach Digital - Magento 2 Docker development environment
services:
# https by default with https://github.com/varnish/hitch
#
# You can use any domain that points to 127.0.0.1, you can't use https://localhost because Magento can't handle that.
#
# bin/magento config:set --lock-env web/unsecure/base_url https://blabla.localhost.reachdigital.io/
# bin/magento config:set --lock-env web/secure/base_url https://blabla.localhost.reachdigital.io/
hitch:
image: zazukoians/hitch
ports:
- 443:443
volumes:
- ./vendor/reach-digital/docker-devbox/hitch/*.localhost.reachdigital.io.pem:/etc/ssl/hitch/combined.pem:ro
environment:
HITCH_PARAMS: --backend=[varnish]:80 --frontend=[*]:443 --alpn-protos="h2,http/1.1" --write-proxy
depends_on:
- varnish
# Cache by default with https://www.varnish-software.com/
#
# bin/magento setup:config:set --http-cache-hosts=127.0.0.1:6081
# bin/magento config:set --lock-config system/full_page_cache/caching_application 2
#
# You can use bin/magento cache:clean or cache:flush to flush Varnish.
# You can use CMD+SHIFT+R to bypass the cache for a page
varnish:
image: hermsi/alpine-varnish
volumes:
- ./vendor/reach-digital/docker-devbox/varnish/default.vcl:/etc/varnish/default.vcl:ro
ports:
- 6081:6081
environment:
VARNISH_PORT: 80,PROXY
VARNISHD_ADDITIONAL_OPTS: -p feature=+http2 -a :6081
#VARNISHLOG: 'true'
depends_on:
- nginx
# phplogs: tail -f /usr/local/var/log/php*
nginx:
image: nginx:alpine
volumes:
- ./vendor/reach-digital/docker-devbox/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.template:ro
- ./vendor/reach-digital/docker-devbox/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- .:/var/www/data:ro
environment:
FPM_PORT: 9072
FPM_XDEBUG: 9172
FPM_ROOT: $PWD/pub
command: /bin/sh -c "envsubst '$$FPM_PORT $$FPM_XDEBUG $$FPM_ROOT $$FPM_ROOT_ABS' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
mysql:
image: percona:5.7
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: magento
MYSQL_DATABASE: magento
MYSQL_USER: magento
MYSQL_PASSWORD: magento
volumes:
- ./vendor/reach-digital/docker-devbox/mysql:/etc/my.cnf.d
- ./var/.mysqldata:/var/lib/mysql
# php bin/magento setup:config:set --cache-backend=redis --cache-backend-redis-db=0 --cache-backend-redis-port=6379
# php bin/magento setup:config:set --session-save=redis --session-save-redis-db=2 --session-save-redis-port=6379
redis:
image: redis:5-alpine
command: ["redis-server", "--appendonly", "yes"]
ports:
- 6379:6379
# bin/magento config:set --lock-config catalog/search/enable_eav_indexer 0
# bin/magento config:set --lock-config catalog/search/engine [elasticsearch6 OR elasticsuite]
# bin/magento config:set --lock-env catalog/search/elasticsearch6_server_port 9200
# bin/magento config:set --lock-env catalog/search/elasticsearch6_server_hostname localhost
elasticsearch:
build: ./vendor/reach-digital/docker-devbox/elasticsearch
ports:
- 9200:9200
- 9300:9300
environment:
- discovery.type=single-node
volumes:
- ./var/.esdata:/usr/share/elasticsearch/data
# composer require mageplaza/module-smtp
# php bin/magento setup:upgrade
# bin/magento config:set --lock-env system/smtp/disable 0
# bin/magento config:set --lock-env system/smtp/host localhost
# bin/magento config:set --lock-env system/smtp/port 1025
# http://localhost:8025/
mailhog:
image: mailhog/mailhog:v1.0.0
ports:
- 1025:1025
- 8025:8025
# bin/magento setup:config:set --amqp-host=localhost --amqp-port=5672 --amqp-user=guest --amqp-password=guest
# http://localhost:15672
rabbitmq:
image: rabbitmq:3-management-alpine
ports:
- 5672:5672
- 15672:15672