Skip to content

Instantly share code, notes, and snippets.

@jbajic
Last active August 27, 2021 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbajic/ece26d409b8e0860911fe356e75dcd5e to your computer and use it in GitHub Desktop.
Save jbajic/ece26d409b8e0860911fe356e75dcd5e to your computer and use it in GitHub Desktop.
Apache Kafka & Memgraph
# Apache Kafka & Memgraph deployment script
# You can pur transformation scripts in ./memgraph/query_modules which will be bounded into memgraph container
version: "3"
services:
zookeeper:
image: bitnami/zookeeper:3.7
ports:
- "2181:2181"
volumes:
- "zookeeper_data:/bitnami"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: bitnami/kafka:2
ports:
- "9092:9092"
volumes:
- "kafka_data:/bitnami"
environment:
- KAFKA_BROKER_ID=1
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,EXTERNAL://localhost:9093
- KAFKA_INTER_BROKER_LISTENER_NAME=CLIENT
depends_on:
- zookeeper
memgraph:
image: memgraph/memgraph:latest
volumes:
- "./memgraph/query_modules:/usr/lib/memgraph/query_modules"
- mg_lib:/var/lib/memgraph
- mg_log:/var/log/memgraph
- mg_etc:/etc/memgraph
entrypoint: ["/usr/lib/memgraph/memgraph", "--kafka-bootstrap-servers=kafka:9092"]
ports:
- "7687:7687"
volumes:
zookeeper_data:
driver: local
kafka_data:
driver: local
mg_lib:
driver: local
mg_log:
driver: local
mg_etc:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment