-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
35 lines (34 loc) · 1.29 KB
/
docker-compose.yaml
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
# SPDX-FileCopyrightText: Contributors to the GXF project
#
# SPDX-License-Identifier: Apache-2.0
version: '3'
services:
kafka:
container_name: kafka
image: confluentinc/cp-kafka:7.5.3
ports:
- "9092:9092"
environment:
KAFKA_NODE_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092'
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka:29093'
KAFKA_LISTENERS: 'PLAINTEXT://kafka:29092,CONTROLLER://kafka:29093,PLAINTEXT_HOST://0.0.0.0:9092'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
CLUSTER_ID: 'MkU3OEVBNTcwNTJENDM2Qk'
# Run The following commands in sepereate terminals to test:
# 1: mosquitto_sub -h localhost -t "sensor/temperature" -u admin -P password
# 2: mosquitto_pub -h localhost -t sensor/temperature -m 23 -u admin -P password
mosquitto:
image: eclipse-mosquitto:2
volumes:
- ./docker/mosquitto/config/:/mosquitto/config/
- mosquitto:/mosquitto/data/
ports:
- "1883:1883"
- "9001:9001"
volumes:
mosquitto: ~