-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
119 lines (107 loc) · 3.28 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
version: '3.6'
volumes:
zookeeper-data:
driver: local
zookeeper-log:
driver: local
kafka-data:
driver: local
services:
# ----------------- #
# Apache Nifi #
# ----------------- #
nifi:
image: apache/nifi:latest # latest image as of 2023-11-10.
container_name: nifi
ports:
- 8000:8000 # Map host port 8000 to container port 8000
environment:
- NIFI_WEB_HTTP_PORT=8000 # NiFi HTTP port
volumes:
- ./nifi-data:/opt/nifi/nifi-current/data # Persist NiFi data outside the container
depends_on:
- zookeeper
networks:
- nifi-network
registry:
image: 'apache/nifi-registry:latest' # latest image as of 2023-11-10.
restart: on-failure
ports:
- "18080:18080"
environment:
- LOG_LEVEL=INFO
- NIFI_REGISTRY_DB_DIR=/opt/nifi-registry/nifi-registry-current/database
- NIFI_REGISTRY_FLOW_PROVIDER=file
- NIFI_REGISTRY_FLOW_STORAGE_DIR=/opt/nifi-registry/nifi-registry-current/flow_storage
volumes:
- ./nifi_registry/database:/opt/nifi-registry/nifi-registry-current/database
- ./nifi_registry/flow_storage:/opt/nifi-registry/nifi-registry-current/flow_storage
networks:
- nifi-network
# ----------------- #
# Apache Kafka #
# ----------------- #
zookeeper:
image: confluentinc/cp-zookeeper:${CONFLUENT_VERSION:-latest} # latest image as of 2023-11-10.
restart: unless-stopped
volumes:
- zookeeper-data:/var/lib/zookeeper/data:Z
- zookeeper-log:/var/lib/zookeeper/log:Z
environment:
ZOOKEEPER_CLIENT_PORT: '2181'
ZOOKEEPER_ADMIN_ENABLE_SERVER: 'false'
networks:
- nifi-network
kafka:
image: confluentinc/cp-kafka:${CONFLUENT_VERSION:-latest} # latest image as of 2023-11-10.
restart: unless-stopped
volumes:
- kafka-data:/var/lib/kafka/data:Z
environment:
KAFKA_BROKER_ID: '0'
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_NUM_PARTITIONS: '12'
KAFKA_COMPRESSION_TYPE: 'gzip'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: '1'
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: '1'
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: '1'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka:9092'
KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_AUTHORIZER_CLASS_NAME: 'kafka.security.authorizer.AclAuthorizer'
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: 'true'
links:
- zookeeper
networks:
- nifi-network
akhq:
image: tchiotludo/akhq # latest image as of 2023-11-10.
restart: unless-stopped
environment:
AKHQ_CONFIGURATION: |
akhq:
connections:
docker-kafka-server:
properties:
bootstrap.servers: "kafka:9092"
ports:
- 8080:8080
links:
- kafka
networks:
- nifi-network
kafkacat:
image: confluentinc/cp-kafkacat:${CONFLUENT_KAFKACAT_VERSION:-latest} # latest image as of 2023-11-10.
restart: unless-stopped
depends_on:
- kafka
volumes:
- ./kafka_producer.sh:/kafka_producer.sh
command: ["/bin/sh", "/kafka_producer.sh"]
links:
- kafka
networks:
- nifi-network
networks:
nifi-network:
driver: bridge