Files
docker/kafka/Demo/SingleNode/README.md
2025-11-01 21:18:29 +08:00

20 lines
539 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 部署 kafka 单节点
- 根据实际环境修改 docker-compose.yml
* CONF: 单节点只能用 server, 使用内置的 server 配置文件,该文件中默认配置的角色是 "controller,broker"
* CLUSTER_ID: 这里要替换成 uuid生成命令
```
docker run --rm harbor.boyachain.cn:20443/general/kafka:4.0 kafka-storage.sh random-uuid
```
- 创建目录
```
grep '\<source:' docker-compose.yml | cut -d: -f2 | xargs mkdir -p
```
- 启动
```
docker-compose up -d
```