-
Notifications
You must be signed in to change notification settings - Fork 2
/
magento2.yml
155 lines (143 loc) · 4.03 KB
/
magento2.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
version: '2.1'
networks:
reverse-proxy:
external: true
my-magento:
services:
db:
image: 'mariadb:10.2'
labels:
- "traefik.enable=true"
- "traefik.tcp.routers.db.rule=HostSNI(`*`)"
- "traefik.tcp.services.db.loadbalancer.server.port=3306"
- "traefik.tcp.routers.db.entrypoints=mysql"
volumes:
- /var/lib/mysql
- './.docker/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d'
environment:
- MYSQL_ROOT_PASSWORD=magento2
- MYSQL_DATABASE=magento2
- MYSQL_USER=magento2
- MYSQL_PASSWORD=magento2
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 10s
retries: 50
networks:
- reverse-proxy
- my-magento
redis:
image: 'redis:5.0'
volumes:
- /data
ports:
- 6379
networks:
- my-magento
elasticsearch:
image: 'magento/magento-cloud-docker-elasticsearch:6.5'
ports:
- 9200:9200
networks:
- my-magento
fpm:
image: my-magento-fpm:1.1
build:
context: ./.docker/php-fpm
dockerfile: Dockerfile-dev
ports:
- 9000
extends: generic
depends_on:
db:
condition: service_healthy
environment:
- PHP_ENABLE_XDEBUG=true
volumes: &fpmVolumes
- 'magento:/app:delegated'
- 'magento-vendor:/app/vendor:delegated'
- 'magento-generated:/app/generated:delegated'
- 'magento-setup:/app/setup:delegated'
- 'magento-static:/app/pub/static:delegated'
- 'magento-media:/app/pub/media:delegated'
- 'node-modules:/app/node-modules:delegated'
- '~/.composer/cache:/root/.composer/cache:delegated'
- './.docker/mnt:/mnt'
- './.docker/tmp:/tmp'
- './.docker/php-cli/conf-dev/zz-mail.ini:/usr/local/etc/php/conf.d/zz-mail.ini'
working_dir: /app
networks:
- my-magento
m2-cli:
image: my-magento-dev:1.1
build:
context: ./.docker/php-cli
dockerfile: Dockerfile-dev
hostname: deploy.magento2.docker
depends_on:
db:
condition: service_healthy
extends: generic
volumes: *fpmVolumes
networks:
- my-magento
web:
image: 'magento/magento-cloud-docker-nginx:latest'
labels:
- "traefik.enable=true"
- "traefik.http.routers.my-magento-web.rule=Host(`my-magento.local`)"
- "traefik.http.routers.my-magento-web.entrypoints=web"
depends_on:
- fpm
extends: generic
volumes: *fpmVolumes
networks:
- reverse-proxy
- my-magento
generic:
image: alpine
environment:
- PHP_MEMORY_LIMIT=2048M
- UPLOAD_MAX_FILESIZE=64M
- MAGENTO_ROOT=/app
- MAGENTO_RUN_MODE=developer
- PHP_IDE_CONFIG=serverName=my-magento_local_xdebug
- XDEBUG_CONFIG=remote_host=host.docker.internal idekey=PHPSTORM remote_port=9002 remote_log=/tmp/xdebug.log remote_enable=1 remote_connect_back=0
- 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip redis xsl'
#uncommment next line to use xdebug and restart fpm: docker-compose -f docker-compose-dev.yml restart fpm
#- 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip redis xsl xdebug'
env_file:
- ./.docker/config.env
networks:
- my-magento
rabbitmq:
image: rabbitmq:3.7-management-alpine
ports:
- 5672
- 15672:15672
volumes:
- .docker/rabbitmq/etc/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
networks:
- my-magento
mailhog:
image: mailhog/mailhog
ports:
- "1025"
- "8025:8025"
networks:
- my-magento
volumes:
magento:
driver: local
driver_opts:
type: nfs
device: ':${PWD}'
o: addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3
magento-vendor: { }
magento-generated: { }
magento-setup: { }
magento-var: { }
magento-etc: { }
magento-static: { }
magento-media: { }
node-modules: { }