Skip to content

Commit

Permalink
FDP-1736: Update Docker compose (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasperkamerling committed Jan 17, 2024
1 parent 42f2dd8 commit 6e0ad1e
Showing 1 changed file with 14 additions and 30 deletions.
44 changes: 14 additions & 30 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,24 @@
#
# SPDX-License-Identifier: Apache-2.0

version: '2'
version: '3'
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.3.0
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- "22181:2181"
kafka:
image: confluentinc/cp-kafka:7.3.0
depends_on:
- zookeeper
container_name: kafka
image: confluentinc/cp-kafka:7.5.3
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
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_CREATE_TOPICS: "avroTopic:1:1"
schema-registry:
image: confluentinc/cp-schema-registry:7.3.0
depends_on:
- zookeeper
- kafka
ports:
- "8081:8081"
environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'kafka:29092'
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
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
Expand All @@ -45,7 +29,7 @@ services:
- ./docker/mosquitto/config/:/mosquitto/config/
- mosquitto:/mosquitto/data/
ports:
- 1883:1883
- 9001:9001
- "1883:1883"
- "9001:9001"
volumes:
mosquitto: ~

0 comments on commit 6e0ad1e

Please sign in to comment.