forked from akvorado/akvorado
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
165 lines (158 loc) · 5.36 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
---
version: "3"
volumes:
akvorado-zookeeper:
akvorado-kafka:
akvorado-geoip:
akvorado-clickhouse:
akvorado-run:
akvorado-console-db:
services:
geoip:
# Put ACCOUNT_ID and LICENSE_KEY here, or provide them on the command-line
# (env GEOIPUPDATE_ACCOUNT_ID=... GEOIPUPDATE_LICENSE_KEY=... docker-compose ...)
image: maxmindinc/geoipupdate:v4
environment:
- GEOIPUPDATE_ACCOUNT_ID
- GEOIPUPDATE_LICENSE_KEY
- GEOIPUPDATE_EDITION_IDS=GeoLite2-ASN GeoLite2-Country
- GEOIPUPDATE_FREQUENCY=48
volumes:
- akvorado-geoip:/usr/share/GeoIP
zookeeper:
image: bitnami/zookeeper:3.6
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
restart: unless-stopped
volumes:
- akvorado-zookeeper:/bitnami/zookeeper
kafka:
image: bitnami/kafka:2.8.1
environment:
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_DELETE_TOPIC_ENABLE=true
restart: unless-stopped
depends_on:
- zookeeper
volumes:
- akvorado-kafka:/bitnami/kafka
healthcheck:
interval: 20s
timeout: 10s
retries: 3
test: ["CMD", "kafka-topics.sh", "--list", "--zookeeper", "zookeeper:2181"]
kafka-ui:
image: provectuslabs/kafka-ui:v0.4.0
restart: unless-stopped
environment:
- KAFKA_CLUSTERS_0_NAME=local
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
- SERVER_SERVLET_CONTEXT_PATH=/kafka-ui
labels:
- traefik.enable=true
- traefik.http.routers.kafka-ui.entrypoints=private
- traefik.http.routers.kafka-ui.rule=PathPrefix(`/kafka-ui`)
# Choose one of the two options: build from source, or download
# latest stable release from GitHub.
akvorado-service: &akvorado-image
# build: {context: .}
image: ghcr.io/vincentbernat/akvorado:latest
command: version
akvorado-orchestrator:
<<: *akvorado-image
restart: unless-stopped
command: orchestrator /etc/akvorado.yaml
volumes:
- ./akvorado.yaml:/etc/akvorado.yaml:ro
labels:
- traefik.enable=true
- traefik.http.routers.akvorado-orchestrator.entrypoints=private # it exposes configuration files with passwords
- traefik.http.routers.akvorado-orchestrator.rule=PathPrefix(`/api/v0/orchestrator`)
- traefik.http.services.akvorado-orchestrator.loadbalancer.server.port=8080
akvorado-console:
<<: *akvorado-image
restart: unless-stopped
command: console http://akvorado-orchestrator:8080
volumes:
- akvorado-console-db:/run/akvorado
labels:
- traefik.enable=true
- traefik.http.routers.akvorado-console.rule=PathPrefix(`/`)
- traefik.http.services.akvorado-console.loadbalancer.server.port=8080
- traefik.http.middlewares.testheader.headers.customrequestheaders.Remote-User=alfred
- traefik.http.middlewares.testheader.headers.customrequestheaders.Remote-Name=Alfred Pennyworth
- traefik.http.middlewares.testheader.headers.customrequestheaders.Remote-Email=alfred@example.com
akvorado-inlet:
<<: *akvorado-image
ports:
- 2055:2055/udp
- 6343:6343/udp
restart: unless-stopped
command: inlet http://akvorado-orchestrator:8080
volumes:
- akvorado-geoip:/usr/share/GeoIP:ro
- akvorado-run:/run/akvorado
labels:
- traefik.enable=true
- traefik.http.routers.akvorado-inlet.rule=PathPrefix(`/api/v0/inlet`)
- traefik.http.services.akvorado-inlet.loadbalancer.server.port=8080
- akvorado.conntrack.fix=true
akvorado-conntrack-fixer:
<<: *akvorado-image
cap_add:
- NET_ADMIN
command: conntrack-fixer
restart: unless-stopped
network_mode: host
healthcheck:
disable: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
# Remove the following exporters if you don't want to get demo data.
akvorado-exporter0: &exporter
<<: *akvorado-image
restart: unless-stopped
command: demo-exporter http://akvorado-orchestrator:8080#0
akvorado-exporter1:
<<: *exporter
command: demo-exporter http://akvorado-orchestrator:8080#1
akvorado-exporter2:
<<: *exporter
command: demo-exporter http://akvorado-orchestrator:8080#2
akvorado-exporter3:
<<: *exporter
command: demo-exporter http://akvorado-orchestrator:8080#3
clickhouse:
image: clickhouse/clickhouse-server:22.8
volumes:
- ./orchestrator/clickhouse/data/docker-entrypoint.sh:/docker-entrypoint-initdb.d/init-db.sh:ro
- akvorado-clickhouse:/var/lib/clickhouse
environment:
- CLICKHOUSE_INIT_TIMEOUT=60
restart: unless-stopped
healthcheck:
interval: 30s
timeout: 10s
retries: 3
test: ["CMD", "wget", "-T", "1", "--spider", "--no-proxy", "http://clickhouse:8123"]
labels:
- traefik.enable=true
- traefik.http.routers.clickhouse.entrypoints=private
- traefik.http.routers.clickhouse.rule=PathPrefix(`/clickhouse`)
- traefik.http.services.clickhouse.loadbalancer.server.port=8123
traefik:
image: traefik:2.6
restart: unless-stopped
command:
- --api=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
# - --providers.docker.allowEmptyServices=true
- --entrypoints.private.address=:8080
- --entrypoints.public.address=:8081
ports:
- 127.0.0.1:8080:8080/tcp
- 8081:8081/tcp
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro