forked from duhon/magento-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
187 lines (185 loc) · 6.47 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
version: '3.7'
services:
# graphql:
# image: node:12.14.1-buster-slim
# command: sh -c './bin/magento-graphql start '
# tty: true
# working_dir: /usr/src/app
# depends_on:
# - app
# volumes:
# - ${MAGENTO_PATH}/graphql:/usr/src/app:${FILE_SYNC}
# environment:
# - MONOLITH_GRAPHQL_URL=http://magento.test/graphql
# - LOG_FILE=/usr/src/app/app.log
# - ENABLE_CATALOG_STOREFRONT=true
# - CATALOG_STOREFRONT_HOST=app
# - CATALOG_STOREFRONT_PORT=9001
# ports:
# - 8008:8008
web:
image: nginx:alpine
hostname: web
volumes:
- ${MAGENTO_PATH}:/var/www:${FILE_SYNC}
- ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./etc/nginx/server.crt:/etc/nginx/server.crt
- ./etc/nginx/server.key:/etc/nginx/server.key
- ./etc/nginx/fetch_env.js:/etc/nginx/fetch_env.js
networks:
default:
aliases:
- magento.test
ports:
- "${WEB_PORT}:80"
- "${WEBS_PORT}:443"
depends_on:
- app
# command: nginx-debug -g 'daemon off;'
x-hint: uncomment the line above and change error_log in nginx.conf
x-info: https://devdocs.magento.com/guides/v2.3/install-gde/prereq/nginx.html
db:
image: mysql:8
hostname: db
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: "magento"
shm_size: '2gb'
command: --default-authentication-plugin=mysql_native_password
volumes:
- ./etc/mysql/my.cnf:/etc/mysql/conf.d/mysql.cnf
ports:
- "${DB_PORT}:3306"
cap_add:
- SYS_NICE
x-hits:
- bin/magento dev:query-log:enable and watch var/debug/db.log
x-info: https://devdocs.magento.com/guides/v2.3/install-gde/prereq/mysql.html
# Message Broker container (magento/storefront-message-broker repo)
app-message-broker:
image: rkostiv/php-with-rr-grpc
hostname: app-message-broker
working_dir: /var/www/app
ports:
- "223:22" #ssh
stop_signal: SIGKILL
volumes:
- ${MAGENTO_PATH}/storefront-message-broker:/var/www/app:${FILE_SYNC}
- ./etc/php/auth.json:/var/www/app/auth.json:ro
- ./etc/php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
- .:/var/www/magento-docker
- ./etc/php/tools:/usr/local/bin/magento2:ro
- ./etc/php/php.ini:/usr/local/etc/php/php.ini:ro
- ./etc/php/php-fpm.conf:/usr/local/etc/php-fpm.conf
environment:
COMPOSER_HOME: /var/www/.composer
command: sh -c 'service ssh start; php-fpm -R'
# Magento 2 container with commerce-data-export repo
app:
image: rkostiv/php-with-rr-grpc
# to re-build image with gRPC use the following docker file:
# build:
# context: .
# dockerfile: build/php/fpm-grpc
hostname: app
ports:
- "${SSH_PORT}:22"
- "9001:9001"
depends_on:
- elastic
- db
stop_signal: SIGKILL
volumes:
- ${MAGENTO_PATH}:/var/www:${FILE_SYNC}
- ./:/var/www/magento-docker:${FILE_SYNC}
# - ./etc/php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
- ./etc/php/tools:/usr/local/bin/magento2:ro
# - ./etc/php/tideways.ini:/usr/local/etc/php/conf.d/tideways.ini
# - ./etc/php/profiler.php:/usr/local/lib/php/header.php
# - ./etc/php/append.ini:/usr/local/etc/php/conf.d/append.ini
- ./etc/php/php.ini:/usr/local/etc/php/php.ini:ro
- ./etc/php/php-fpm.conf:/usr/local/etc/php-fpm.conf
- ./etc/php/tests/functional/phpunit.xml:/var/www/magento2ce/dev/tests/functional/phpunit.xml:rw
- ./etc/php/tests/functional/config.xml:/var/www/magento2ce/dev/tests/functional/etc/config.xml:rw
- ./etc/php/tests/acceptance/.env:/var/www/magento2ce/dev/tests/acceptance/.env:rw
- ./etc/php/tests/integration/install-config-mysql.php:/var/www/magento2ce/dev/tests/integration/etc/install-config-mysql.php:rw
- ./etc/php/tests/api-functional/install-config-mysql.php:/var/www/magento2ce/dev/tests/api-functional/config/install-config-mysql.php:rw
- ./etc/php/tests/api-functional/phpunit_rest.xml:/var/www/magento2ce/dev/tests/api-functional/phpunit_rest.xml:rw
- ./etc/php/tests/api-functional/phpunit_graphql.xml:/var/www/magento2ce/dev/tests/api-functional/phpunit_graphql.xml:rw
environment:
COMPOSER_HOME: /var/www/.composer
PHP_IDE_CONFIG: serverName=magento.test
command: sh -c 'service ssh start; php-fpm -R'
x-hints:
- magento reinstall ee
x-setup:
x-info: https://devdocs.magento.com/
elastic:
image: elasticsearch:$ELASTICSEARCH_IMAGE_VERSION
hostname: elastic
ports:
- "${ELASTIC_PORT}:9200"
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
x-hits:
- curl -i http://localhost:9200/_cluster/health
x-info: https://devdocs.magento.com/guides/v2.3/config-guide/elasticsearch/es-overview.html
redis:
image: redis
hostname: redis
ports:
- "${REDIS_PORT}:6379"
sysctls:
net.core.somaxconn: 1024
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
x-hints:
- redis-cli monitor
- telnet localhost 6379
x-setup:
x-info: https://devdocs.magento.com/guides/v2.3/config-guide/redis/config-redis.html
rabbit:
image: rabbitmq:management
hostname: rabbitmq
ports:
- "${RABBIT_PORT}:15672"
x-hints:
- bin/magento queue:consumers:list
- bin/magento queue:consumers:start
- "http://localhost:15672/ user:guest pass:guest"
x-setup:
x-info: https://devdocs.magento.com/guides/v2.3/config-guide/mq/manage-message-queues.html
# mail:
# image: mailhog/mailhog
# hostname: mail
# ports:
# - "1025:1025"
# - "8025:8025"
# Uncomment after gRPC server executed.
# grpcui:
# image: wongnai/grpcui
# ports:
# - "8080:8080"
# volumes:
# - ${MAGENTO_PATH}:/var/www
# entrypoint: ["grpcui", "-plaintext", "-proto", "magento.proto", "-port", "8080", "-bind", "0.0.0.0", "-import-path", "/var/www/magento2ce", "app:9001"]
# grpcui-pricing:
# image: wongnai/grpcui
# ports:
# - "8082:8080"
# volumes:
# - ${MAGENTO_PATH}/storefront-pricing-ce:/var/www/magento2ce
# entrypoint: ["grpcui", "-plaintext", "-proto", "pricing.proto", "-port", "8080", "-bind", "0.0.0.0", "-import-path", "/var/www/magento2ce", "app-pricing:9001"]
networks:
default:
driver: bridge