-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
119 lines (112 loc) · 3.38 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
119 lines (112 loc) · 3.38 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
services:
generator:
build: ./generator
container_name: drift-generator
volumes:
- ./logs:/logs
restart: unless-stopped
filebeat:
image: docker.elastic.co/beats/filebeat:9.2.4
container_name: drift-filebeat
user: root
volumes:
- ./filebeat/filebeat.yaml:/usr/share/filebeat/filebeat.yml:ro
- ./logs:/logs:ro
- filebeat-data:/usr/share/filebeat/data
command: filebeat -e --strict.perms=false
depends_on:
generator:
condition: service_started
kafka:
condition: service_healthy
restart: unless-stopped
kafka:
image: apache/kafka:latest
container_name: drift-broker
ports:
- "9092:9092"
environment:
- KAFKA_NODE_ID=1
- KAFKA_PROCESS_ROLES=broker,controller
- KAFKA_CONTROLLER_QUORUM_VOTERS=1@drift-broker:9093
- KAFKA_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://drift-broker:9092
- KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
volumes:
- kafka-data:/var/lib/kafka/data
healthcheck:
test: ["CMD-SHELL", "/opt/kafka/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092 || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
logstash:
image: docker.elastic.co/logstash/logstash:8.14.3
container_name: drift-logstash
volumes:
- ./logstash/pipeline.conf:/usr/share/logstash/pipeline/pipeline.conf:ro
environment:
- XPACK_MONITORING_ENABLED=false
depends_on:
kafka:
condition: service_healthy
elasticsearch:
condition: service_healthy
clickhouse:
condition: service_healthy
restart: unless-stopped
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.14.3
container_name: drift-elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- "9200:9200"
volumes:
- es-data:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cluster/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
clickhouse:
image: clickhouse/clickhouse-server:latest
container_name: drift-clickhouse
ports:
- "8123:8123"
- "9000:9000"
volumes:
- clickhouse-data:/var/lib/clickhouse
- ./clickhouse/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
- ./clickhouse/users.xml:/etc/clickhouse-server/users.d/users.xml:ro
healthcheck:
test: ["CMD-SHELL", "clickhouse-client -q 'SELECT 1' || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
restart: unless-stopped
clickhouse-init:
image: clickhouse/clickhouse-server:latest
container_name: drift-clickhouse-init
depends_on:
clickhouse:
condition: service_healthy
volumes:
- ./clickhouse/init.sql:/init.sql:ro
entrypoint: ["clickhouse-client", "--host", "drift-clickhouse", "--multiquery"]
command: ["--queries-file", "/init.sql"]
restart: "no"
volumes:
logs:
filebeat-data:
kafka-data:
es-data:
clickhouse-data: