Skip to content

Instantly share code, notes, and snippets.

@ezy
Created April 2, 2019 02:51
Show Gist options
  • Select an option

  • Save ezy/2ef28397978759953017d5894b04517c to your computer and use it in GitHub Desktop.

Select an option

Save ezy/2ef28397978759953017d5894b04517c to your computer and use it in GitHub Desktop.
docker-compose.yml for setup on OSX
version: '3.6'
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
ports:
- 32181:32181
environment:
ZOOKEEPER_CLIENT_PORT: 32181
ZOOKEEPER_TICK_TIME: 2000
extra_hosts:
- "moby:127.0.0.1"
- "localhost: 127.0.0.1"
kafka:
image: confluentinc/cp-kafka:latest
hostname: kafka
ports:
- 29092:29092
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:32181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://host.docker.internal:29092
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
extra_hosts:
- "moby:127.0.0.1"
- "localhost: 127.0.0.1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment