-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (57 loc) · 1.65 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
version: '3.7'
services:
kafka:
image: bitnami/kafka:3.9.0
ports:
- "9092:9092"
networks:
- ci-network
environment:
KAFKA_CFG_PROCESS_ROLES: broker,controller
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CFG_LISTENERS: INTERNAL://:9093,CONTROLLER://:9094,EXTERNAL://:9092
KAFKA_CFG_ADVERTISED_LISTENERS: INTERNAL://kafka:9093,EXTERNAL://${DOCKER_NETWORK_IP:-localhost}:9092
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_CFG_NODE_ID: '1'
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 1@kafka:9094
ALLOW_PLAINTEXT_LISTENER: 'yes'
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: INTERNAL
kafka-create-topics:
image: bitnami/kafka:3.9.0
depends_on:
- kafka
networks:
- ci-network
command: >
bash -c "
/opt/bitnami/kafka/bin/kafka-topics.sh --create --if-not-exists --bootstrap-server kafka:9093 --replication-factor 1 --partitions 1 --topic test-topic
"
influxdb:
image: influxdb:1.11.8
ports:
- "8086:8086"
networks:
- ci-network
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8086/metrics" ]
interval: 2s
timeout: 60s
retries: 30
health:
image: alpine:3.21.0
depends_on:
kafka-create-topics:
condition: service_completed_successfully
influxdb:
condition: service_healthy
networks:
- ci-network
command: |
sh -c '
wget -q -O - http://influxdb:8086/metrics
sleep 600
'
networks:
ci-network:
external: true