Created
January 16, 2026 07:12
-
-
Save sandeep540/e1d645fe678da2853d420515c70b2572 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| broker: | |
| image: apache/kafka-native:latest | |
| container_name: broker | |
| ports: | |
| - "9092:9092" # host access | |
| - "29092:29092" # internal access | |
| environment: | |
| KAFKA_NODE_ID: 1 | |
| KAFKA_PROCESS_ROLES: broker,controller | |
| # LISTENERS | |
| KAFKA_LISTENERS: EXTERNAL://0.0.0.0:9092,INTERNAL://0.0.0.0:29092,CONTROLLER://0.0.0.0:9093 | |
| KAFKA_ADVERTISED_LISTENERS: EXTERNAL://localhost:9092,INTERNAL://broker:29092 | |
| KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: EXTERNAL:PLAINTEXT,INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT | |
| # KRaft controller | |
| KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER | |
| KAFKA_CONTROLLER_QUORUM_VOTERS: 1@broker:9093 | |
| # THIS FIXES YOUR CURRENT ERROR | |
| KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL | |
| # single-node safety | |
| KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | |
| KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 | |
| KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 | |
| KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 | |
| KAFKA_NUM_PARTITIONS: 3 | |
| networks: | |
| - kafka-network | |
| console: | |
| image: docker.redpanda.com/redpandadata/console:latest | |
| restart: on-failure | |
| entrypoint: /bin/sh | |
| command: -c "echo \"$$CONSOLE_CONFIG_FILE\" > /tmp/config.yml; /app/console" | |
| environment: | |
| CONFIG_FILEPATH: /tmp/config.yml | |
| CONSOLE_CONFIG_FILE: | | |
| kafka: | |
| brokers: ["broker:29092"] | |
| ports: | |
| - "8080:8080" | |
| depends_on: | |
| - broker | |
| networks: | |
| - kafka-network | |
| networks: | |
| kafka-network: | |
| driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment