-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
141 lines (133 loc) · 4.28 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
version: '3.6'
services:
webserver:
image: nginx:alpine
volumes:
- project-data:/magento
- ./etc/nginx/magento.conf:/etc/nginx/conf.d/default.conf
- ./etc/nginx/xhgui.conf:/etc/nginx/conf.d/xhgui.conf
- ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf
environment:
- VIRTUAL_HOST=${COMPOSE_PROJECT_NAME}.${INGRESS_SERVICE_DOMAIN:-mage.perf}
labels:
- "traefik.enable=true"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_PROJECT_NAME}.${INGRESS_SERVICE_DOMAIN:-mage.perf}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=web"
networks:
default:
aliases:
- "${COMPOSE_PROJECT_NAME}.${INGRESS_SERVICE_DOMAIN:-mage.perf}"
ingress_web:
app:
build:
context: build/php
dockerfile: Dockerfile
args:
XDEBUG: 0
hostname: app
privileged: true
volumes:
- project-data:/magento
- ./etc/php/php.ini:/usr/local/etc/php/php.ini:ro
- ~/.ssh:/root/.ssh:ro
- ~/.composer:/root/.composer:delegated
app-xdebug:
build:
context: build/php
dockerfile: Dockerfile
args:
XDEBUG: 1
hostname: app-xdebug
volumes:
- project-data:/magento
- ./etc/php/php.ini:/usr/local/etc/php/php.ini:ro
- ~/.ssh:/root/.ssh:ro
- ~/.composer:/root/.composer:delegated
db:
image: mariadb:10.6
# image: mysql:8
command:
- --default-authentication-plugin=mysql_native_password
- --max-allowed-packet=268435456
- --optimizer-use-condition-selectivity=1
- --optimizer-switch=rowid_filter=off
- --join-buffer-size=1048576
- --optimizer_search_depth=6
- --innodb_stats_persistent=false
# - --innodb_lru_scan_depth=100
# - --optimizer-max-sel-arg-weight=512
- --max-heap-table-size=33554432
- --max-long-data-size=268435456
- --tmp-memory-table-size=33554432
- --tmp-table-size=33554432
- --table-open-cache=400
- --innodb-open-files=400
- --innodb-change-buffering=all
- --innodb-lru-scan-depth=1024
- --innodb-io-capacity=400
- --query-cache-limit=131072
- --query-cache-size=67108864
- --query-cache-type=ON
- --read-buffer-size=2097152
- --read-rnd-buffer-size=1048576
- --sort-buffer-size=4194304
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=magento
- MYSQL_PASSWORD=magento
- MYSQL_DATABASE=magento2
volumes:
- db-data:/var/lib/mysql
redis:
image: redis:6-alpine
hostname: redis
elastic:
image: opensearchproject/opensearch:2.9.0
hostname: elastic
environment:
- discovery.type=single-node
- cluster.name=elastic
- bootstrap.memory_lock=true
- plugins.security.disabled=true
- plugins.security.ssl.http.enabled=false
- "OPENSEARCH_JAVA_OPTS=-Xms1G -Xmx1G"
- DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI=true
- DISABLE_SECURITY_DASHBOARDS_PLUGIN=true
- DISABLE_INSTALL_DEMO_CONFIG=true
- OPENSEARCH_TMPDIR=/usr/share/opensearch/tmp
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 524288
hard: 524288
deploy:
resources:
limits:
memory: 1536M
reservations:
memory: 768M
volumes:
- elastic-data:/usr/share/opensearch/data
- elastic-data:/usr/share/opensearch/tmp
rabbit:
image: rabbitmq:management
hostname: rabbitmq
environment:
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
# ports:
# - "15672:15672"
fluentbit:
image: fluent/fluent-bit
volumes:
- ./etc/fluent-bit/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf
volumes:
project-data:
db-data:
elastic-data:
networks:
default:
ingress_web:
external: true