-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yml
172 lines (160 loc) · 3.87 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
version: '2'
services:
nginx-proxy:
image: nginxproxy/nginx-proxy
container_name: ${PROJECT_NAME}-nginx-proxy
restart: always
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./nginx/nginx-proxy.conf:/etc/nginx/nginx.conf
networks:
- magento
nginx:
build: ./nginx
container_name: ${PROJECT_NAME}-nginx
volumes:
- ./magento2:/home/magento:cached
depends_on:
- mysql
- redis
- php-fpm
- nginx-proxy
networks:
- magento
environment:
- VIRTUAL_HOST=${PROJECT_VIRTUAL_HOST}
php-fpm:
build: ./php-fpm
container_name: ${PROJECT_NAME}-php-fpm
volumes:
- ./magento2:/home/magento:cached
- ./php-fpm/php.ini:/etc/php.ini
depends_on:
- mysql
- redis
- rabbitmq
- opensearch
networks:
- magento
environment:
PHP_IDE_CONFIG: "serverName=Docker"
XDEBUG_CONFIG: "client_host=host.docker.internal"
redis:
image: arm64v8/redis:7.0
container_name: ${PROJECT_NAME}-redis
ports:
- "6379:6379"
networks:
- magento
mysql:
image: arm64v8/mysql:8.0.34
container_name: ${PROJECT_NAME}-mysql
volumes:
- ./mysql/mysqld.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf
environment:
MYSQL_DATABASE: 'magento_db'
MYSQL_ROOT_PASSWORD: 'root_pass'
MYSQL_USER: 'magento_user'
MYSQL_PASSWORD: 'PASSWD#'
MYSQL_ALLOW_EMPTY_PASSWORD: 'false'
ports:
- "3308:3306"
networks:
- magento
mailhog:
platform: linux/x86_64
image: mailhog/mailhog
container_name: ${PROJECT_NAME}-mailhog
environment:
- VIRTUAL_HOST=mail.${PROJECT_VIRTUAL_HOST}
- VIRTUAL_PORT=8025
ports:
- "1025:1025"
- "8025:8025"
networks:
- magento
expose:
- 8025
rabbitmq:
image: arm64v8/rabbitmq:3.11-management
container_name: ${PROJECT_NAME}-rabbitmq
environment:
- VIRTUAL_HOST=rabbit.${PROJECT_VIRTUAL_HOST}
- VIRTUAL_PORT=15672
ports:
- "15672:15672"
- "5672:5672"
restart: always
networks:
- magento
expose:
- 15672
opensearch:
image: opensearchproject/opensearch:2.5.0
container_name: ${PROJECT_NAME}-opensearch
ports:
- "9200:9200"
- "9600:9600"
restart: always
networks:
- magento
environment:
- "discovery.type=single-node"
- "bootstrap.memory_lock=true"
- "OPENSEARCH_JAVA_OPTS=-Xms2048m -Xmx2048m"
- "http.host=0.0.0.0"
- "DISABLE_SECURITY_PLUGIN=true"
- VIRTUAL_HOST=search.${PROJECT_VIRTUAL_HOST}
- VIRTUAL_PORT=9200
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
opensearch-dashboard:
image: opensearchproject/opensearch-dashboards:2.5.0
container_name: ${PROJECT_NAME}-opensearch-dashboard
restart: always
networks:
- magento
environment:
- VIRTUAL_HOST=dashboard.${PROJECT_VIRTUAL_HOST}
- VIRTUAL_PORT=5601
- "DISABLE_SECURITY_DASHBOARDS_PLUGIN=true"
- "OPENSEARCH_HOSTS=http://opensearch:9200"
volumes:
- ./opensearch/opensearch_dashboards.yml:/usr/share/opensearch-dashboards/config/opensearch_dashboards.yml
ports:
- "5601:5601"
expose:
- "5601"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems
hard: 65536
varnish:
image: arm64v8/varnish:7.3
container_name: ${PROJECT_NAME}-varnish
restart: always
networks:
- magento
ports:
- "6082:6082"
depends_on:
- nginx
links:
- nginx
volumes:
- ./varnish/varnish.vcl:/etc/varnish/default.vcl
environment:
- CACHE_SIZE=1G
networks:
magento:
driver: bridge