Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
194 lines (185 loc) · 6.41 KB
/
Copy pathdocker-compose.yml
File metadata and controls
194 lines (185 loc) · 6.41 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
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
188
189
190
191
192
193
194
services:
webserver:
image: nginx:1.28-alpine
volumes:
- ./src:/magento:delegated
- ./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
depends_on:
app:
condition: service_started
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-ingress"
- "traefik.http.services.${COMPOSE_PROJECT_NAME}-web.loadbalancer.server.port=80"
- "traefik.http.middlewares.${COMPOSE_PROJECT_NAME}-web-strip.stripprefix.prefixes=/${COMPOSE_PROJECT_NAME}"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-web.rule=Host(`${COMPOSE_PROJECT_NAME}.ccsaas.test`) || Host(`ccsaas.test`) && (PathPrefix(`/${COMPOSE_PROJECT_NAME}/`) || Path(`/${COMPOSE_PROJECT_NAME}`))"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-web.entrypoints=websecure"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-web.tls=true"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-web.service=${COMPOSE_PROJECT_NAME}-web"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-web.middlewares=${COMPOSE_PROJECT_NAME}-web-strip"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-web.priority=20"
networks:
default:
aliases:
- "${COMPOSE_PROJECT_NAME}.ccsaas.test"
traefik-ingress: {}
app:
build:
context: build/php
dockerfile: Dockerfile
args:
XDEBUG: 0
hostname: app
user: "${U_ID}"
# privileged: true
environment:
MAGENTO_DC_WEB__SECURE__BASE_URL: ${MAGENTO_DC_WEB__SECURE__BASE_URL:-https://ccsaas.test/${COMPOSE_PROJECT_NAME}/}
MAGENTO_DC_WEB__COOKIE__COOKIE_PATH: "/${COMPOSE_PROJECT_NAME}/"
MAGENTO_DC_WEB__URL__REDIRECT_TO_BASE: "0"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
elastic:
condition: service_healthy
rabbit:
condition: service_healthy
volumes:
- ./src:/magento:delegated
- ./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
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
elastic:
condition: service_healthy
rabbit:
condition: service_healthy
volumes:
- ./src:/magento:delegated
- ./etc/php/php.ini:/usr/local/etc/php/php.ini:ro
- ~/.ssh:/root/.ssh:ro
- ~/.composer:/root/.composer:delegated
db:
image: mariadb:11.4
# image: mysql:8.0
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
- MARIADB_AUTO_UPGRADE=1
volumes:
- db-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mariadb-admin", "ping", "-h", "localhost", "-uroot", "-proot"]
interval: 10s
timeout: 5s
retries: 12
redis:
image: redis:7.2-alpine
hostname: redis
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 12
elastic:
image: opensearchproject/opensearch:2.19.1
hostname: elastic
environment:
- discovery.type=single-node
- cluster.name=elastic
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms1G -Xmx1G"
- DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI=true
- DISABLE_SECURITY_DASHBOARDS_PLUGIN=true
- DISABLE_SECURITY_PLUGIN=true
- DISABLE_INSTALL_DEMO_CONFIG=true
- OPENSEARCH_TMPDIR=/usr/share/opensearch/tmp
- plugins.security.ssl.http.enabled=false
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
healthcheck:
test: ["CMD-SHELL", "curl --fail --silent http://localhost:9200/_cluster/health >/dev/null"]
interval: 15s
timeout: 10s
retries: 20
rabbit:
image: rabbitmq:4.1-management
hostname: rabbitmq
environment:
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
# ports:
# - "15672:15672"
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 5s
retries: 12
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:
traefik-ingress:
external: true
name: traefik-ingress