Merge pull request #2962 from ryan1068/patch-1

Add Kafka Service
This commit is contained in:
Shao Yu-Lung (Allen) 2021-05-01 23:37:21 +08:00 committed by GitHub
commit e678fafc07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 0 deletions

View File

@ -1950,3 +1950,30 @@ services:
volumes:
- ./react:/usr/src/app/react
- /usr/src/app/react/node_modules
### kafka ####################################################
kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://127.0.0.1:9092
KAFKA_MESSAGE_MAX_BYTES: 2000000
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- ${DATA_PATH_HOST}/kafka:/kafka
- /var/run/docker.sock:/var/run/docker.sock
networks:
- backend
### kafka-manager ###########################################
kafka-manager:
image: sheepkiller/kafka-manager
ports:
- 9020:9000
environment:
ZK_HOSTS: zookeeper:2181
networks:
- backend