Created
November 28, 2023 16:44
-
-
Save JeffryGonzalez/70db84347a93bf56407c97badf91e5cb to your computer and use it in GitHub Desktop.
Docker Compose with KRaft for Kafka
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: | |
auth: | |
image: ghcr.io/navikt/mock-oauth2-server:2.0.0 | |
ports: | |
- 9999:8080 | |
# Postgres database | |
db: | |
image: postgres:15.2-bullseye | |
restart: always | |
environment: | |
POSTGRES_PASSWORD: password | |
POSTGRES_USER: user | |
POSTGRES_DB: db | |
volumes: | |
- db_data:/var/lib/postgresql/data | |
- ./db/:/docker-entrypoint-initdb.d/ | |
ports: | |
- 5439:5432 | |
kafka: | |
image: "bitnami/kafka:latest" | |
volumes: | |
- kafka_data:/bitnami/kafka | |
ports: | |
- "9092:9092" | |
environment: | |
- KAFKA_ENABLE_KRAFT=yes | |
- KAFKA_CFG_PROCESS_ROLES=broker,controller | |
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER | |
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093 | |
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT | |
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092 | |
- KAFKA_BROKER_ID=1 | |
- [email protected]:9093 | |
- ALLOW_PLAINTEXT_LISTENER=yes | |
- KAKFA_CFG_AUTO_CREATE_TOPICS_ENABLE=true | |
- KAFKA_CFG_NODE_ID=1 | |
adminer: | |
image: adminer | |
restart: always | |
ports: | |
- 9090:8080 | |
environment: | |
ADMINER_DESIGN: dracula | |
volumes: | |
db_data: | |
kafka_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment