Skip to content

Instantly share code, notes, and snippets.

@dbuschman7
Created August 2, 2019 04:12
Show Gist options
  • Save dbuschman7/89543db0d11537733178decd14d8abad to your computer and use it in GitHub Desktop.
Save dbuschman7/89543db0d11537733178decd14d8abad to your computer and use it in GitHub Desktop.
docker-compose.yaml
version: '2'
services:
#
# ZooKeeper Service
# ############################
zookeeper:
image: wurstmeister/zookeeper:3.4.6
container_name: zookeeper
restart: always
environment:
ZK_CLIENT_PORT: "2181"
ZK_SERVER_PORT: "2888"
ZK_ELECTION_PORT: "3888"
SERVICE_TAGS: 'zk'
ports:
- "2181:2181"
- "2888:2888"
- "3888:3888"
labels:
description: "Zookeeper Server"
service: "zookeeper"
applications: "zookeeper"
#
# Kafka DataStore
# ############################
kafka:
image: wurstmeister/kafka:1.1.0
container_name: kafka
extra_hosts:
- "kafka.local:127.0.0.1"
restart: always
depends_on:
- zookeeper
ports:
- "9092:9092"
external_links:
- zookeeper:zookeeper.local
environment:
ADVERTISED_HOST: 'kafka.local'
SERVICE_TAGS: 'kafka'
KAFKA_AUTO_CREATE_TOPIC_ENABLE: "true"
KAFKA_DELETE_TOPIC_ENABLE: "true"
KAFKA_ZOOKEEPER_CONNECT: "zookeeper.local:2181"
KAFKA_ADVERTISED_HOST_NAME: "kafka.local"
KAFKA_ADVERTISED_PORT: "9092"
KAFKA_BROKER_ID: "1"
labels:
description: "Kafka Server"
service: "kafka"
applications: "kafka"
#
# Etcd Cache
# ############################
etcd:
image: bitnami/etcd:3
container_name: etcd
ports:
- 2379
- 2380
environment:
ALLOW_NONE_AUTHENTICATION: "yes"
ETCD_ADVERTISE_CLIENT_URLS: "http://etcd:2379"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment