-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (94 loc) · 3.79 KB
/
Copy pathdocker-compose.yml
File metadata and controls
98 lines (94 loc) · 3.79 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
# Local dev MySQL. Ports 33306/33307 avoid conflicts with other local MySQL instances.
# Server and ingest CLI defaults match these ports.
services:
mysql:
image: mysql:8.4.9@sha256:c36050afdca850f23cef85703f84c7531a5ae155a11b5ee1c60acb09937c4084
container_name: fleet-edr-mysql
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: edr
# Cap binlog retention at 1 day (default 30). The two durability flags relax per-commit
# fsync: on Docker Desktop's virtualized volume the default (flush_log_at_trx_commit=1,
# sync_binlog=1) fsyncs redo + binlog on every commit, which stalls single-row writes for
# hundreds of ms at random and trips the server's 500ms slow-request warn. `=2` fsyncs the
# redo log ~once/sec (loses at most ~1s of writes on a host crash, irrelevant for dev) and
# sync_binlog=0 drops the per-commit binlog fsync. Dev/test only; never use in production.
command:
- "--binlog-expire-logs-seconds=86400"
- "--innodb-flush-log-at-trx-commit=2"
- "--sync-binlog=0"
ports:
- "127.0.0.1:33306:3306"
volumes:
- edr-mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
timeout: 5s
retries: 10
mysql_test:
image: mysql:8.4.9@sha256:c36050afdca850f23cef85703f84c7531a5ae155a11b5ee1c60acb09937c4084
container_name: fleet-edr-mysql_test
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: edr_test
# Raise max_connections above the 151 default. The parallel integration suite (issue
# #172) peaks at 200+ concurrent connections; the matching CI step in test.yml does the
# same via `SET GLOBAL` since the GHA service container has no volume mount. The two
# durability flags relax per-commit fsync (same rationale as the dev mysql service above):
# faster integration-test commits, and the test DB is disposable so durability is moot.
command:
- "--max-connections=500"
- "--innodb-flush-log-at-trx-commit=2"
- "--sync-binlog=0"
ports:
- "127.0.0.1:33307:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
timeout: 5s
retries: 10
# ClickHouse event archive (ADR-0015). Two services mirror the MySQL split: clickhouse (dev, :19000 native / :18123 HTTP, persisted)
# and clickhouse_test (test, :19001 / :18124, disposable). Native protocol (9000) is what clickhouse-go uses; HTTP (8123) is for
# clickhouse-client / curl. DEFAULT_ACCESS_MANAGEMENT lets the default user CREATE DATABASE (the test helper makes a DB per test).
clickhouse:
image: clickhouse/clickhouse-server:24.8@sha256:1ffa82edee000a42c09313bd9f1293d94c570aee74babc1b3ca9983a35fa597b
container_name: fleet-edr-clickhouse
environment:
CLICKHOUSE_DB: edr
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: "1"
ports:
- "127.0.0.1:19000:9000"
- "127.0.0.1:18123:8123"
ulimits:
nofile:
soft: 262144
hard: 262144
volumes:
- edr-clickhouse-data:/var/lib/clickhouse
healthcheck:
test: ["CMD", "clickhouse-client", "--query", "SELECT 1"]
interval: 5s
timeout: 5s
retries: 10
clickhouse_test:
image: clickhouse/clickhouse-server:24.8@sha256:1ffa82edee000a42c09313bd9f1293d94c570aee74babc1b3ca9983a35fa597b
container_name: fleet-edr-clickhouse_test
environment:
CLICKHOUSE_DB: edr_test
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: "1"
ports:
- "127.0.0.1:19001:9000"
- "127.0.0.1:18124:8123"
ulimits:
nofile:
soft: 262144
hard: 262144
healthcheck:
test: ["CMD", "clickhouse-client", "--query", "SELECT 1"]
interval: 5s
timeout: 5s
retries: 10
volumes:
edr-mysql-data:
edr-clickhouse-data: