Added kafka service to server
This commit is contained in:
parent
a654276a14
commit
36f2813708
40
Kafka/docker-compose.yml
Normal file
40
Kafka/docker-compose.yml
Normal file
@ -0,0 +1,40 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
zookeeper:
|
||||
image: confluentinc/cp-zookeeper:latest
|
||||
container_name: zookeeper
|
||||
restart: always
|
||||
environment:
|
||||
ZOOKEEPER_CLIENT_PORT: 2181
|
||||
ZOOKEEPER_TICK_TIME: 2000
|
||||
networks:
|
||||
- kafka_network
|
||||
|
||||
kafka:
|
||||
image: confluentinc/cp-kafka:latest
|
||||
container_name: kafka
|
||||
restart: always
|
||||
depends_on:
|
||||
- zookeeper
|
||||
networks:
|
||||
- kafka_network
|
||||
- proxy
|
||||
environment:
|
||||
KAFKA_BROKER_ID: 1
|
||||
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
||||
KAFKA_LISTENERS: PLAINTEXT://kafka:9092
|
||||
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
|
||||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.tcp.routers.kafka.rule=HostSNI(`*`)"
|
||||
- "traefik.tcp.routers.kafka.entrypoints=kafka"
|
||||
- "traefik.tcp.routers.kafka.service=kafka"
|
||||
- "traefik.tcp.services.kafka.loadbalancer.server.port=9092"
|
||||
|
||||
networks:
|
||||
kafka_network:
|
||||
driver: bridge
|
||||
proxy:
|
||||
external: true
|
@ -21,6 +21,10 @@ cd ./Bitwarden/
|
||||
docker-compose down
|
||||
cd ..
|
||||
|
||||
cd ./Kafka/
|
||||
docker-compose down
|
||||
cd ..
|
||||
|
||||
cd ./Misc/
|
||||
docker-compose down
|
||||
cd ..
|
||||
|
@ -26,6 +26,10 @@ cd ./Bitwarden/
|
||||
docker-compose pull && docker-compose up -d
|
||||
cd ..
|
||||
|
||||
cd ./Kafka/
|
||||
docker-compose pull && docker-compose up -d
|
||||
cd ..
|
||||
|
||||
cd ./Misc/
|
||||
docker-compose pull && docker-compose up -d
|
||||
cd ..
|
Loading…
x
Reference in New Issue
Block a user