Skip to content

Instantly share code, notes, and snippets.

@mstykt
Last active April 7, 2022 16:45
Show Gist options
  • Save mstykt/70538a5d926a18ca133da1c6c9edf444 to your computer and use it in GitHub Desktop.
Save mstykt/70538a5d926a18ca133da1c6c9edf444 to your computer and use it in GitHub Desktop.
order-zookeeper:
image: wurstmeister/zookeeper
container_name: order-zookeeper
ports:
- "2181:2181"
order-kafka:
image: wurstmeister/kafka
container_name: order-kafka
ports:
- "9092:9092"
expose:
- "9093"
environment:
KAFKA_ADVERTISED_LISTENERS: INSIDE://order-kafka:9093,OUTSIDE://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_LISTENERS: INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_ZOOKEEPER_CONNECT: order-zookeeper:2181
KAFKA_CREATE_TOPICS: "order.created:3:1"
healthcheck:
test: [ "CMD", "nc", "-vz", "localhost", "9092" ]
interval: 5s
timeout: 10s
retries: 4
depends_on:
- order-zookeeper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment