Skip to content

Commit

Permalink
Merge two Kafka services together to streamline Compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesir87 committed Dec 23, 2024
1 parent fed72ad commit 9c7c14f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
services:

################## DEMO WEB CLIENT ##################
demo-client:
image: node:lts-slim
working_dir: /usr/local/app
Expand Down Expand Up @@ -52,7 +54,7 @@ services:

############## KAFKA AND VISUALIZATION ##############
kafka:
image: apache/kafka-native:3.9.0
image: apache/kafka:3.9.0
ports:
- 9092:9092
environment:
Expand All @@ -72,12 +74,8 @@ services:

# Required for a single node cluster
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1

kafka-topic-creator:
image: apache/kafka:3.9.0
command: /opt/kafka/bin/kafka-topics.sh --create --topic products --partitions 1 --replication-factor 1 --bootstrap-server kafka:9093
depends_on:
- kafka
post_start:
- command: /opt/kafka/bin/kafka-topics.sh --create --topic products --partitions 1 --replication-factor 1 --bootstrap-server kafka:9093

kafka-ui:
image: ghcr.io/kafbat/kafka-ui:01aa8ab36387c5f1d66d098e71488bfb0eb5f39c
Expand Down

0 comments on commit 9c7c14f

Please sign in to comment.