# kfcstack **Repository Path**: shenmk/kfcstack ## Basic Information - **Project Name**: kfcstack - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-26 - **Last Updated**: 2026-07-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # kfcstack 单机内网版 Kafka、Flink、ClickHouse、PostgreSQL、Redis 和 Prometheus/Grafana 基础组件。 完整部署、运维、监控和故障排查说明见 [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md)。 新服务器从零部署见 [docs/FRESH_SERVER.md](docs/FRESH_SERVER.md)。 纯离线交付见 [docs/OFFLINE.md](docs/OFFLINE.md)。 ## 快速启动 ```bash cp .env.example .env docker-compose config docker-compose up -d docker-compose ps ``` 推荐使用交互式管理脚本初始化外部数据和配置目录: ```bash sudo bash scripts/kfcstack.sh ``` 脚本支持 Docker 检查/安装、外部目录初始化、密码配置、Compose 校验、镜像拉取、全栈启动停止和状态查看。默认外部目录为 `/srv/kfcstack/data`、`/srv/kfcstack/conf`、`/srv/kfcstack/monitoring`。 新装 Debian/Ubuntu/Deepin 服务器可以先执行 bootstrap,它会安装 Git、从 Gitee 拉取代码,再进入上述交互菜单: ```bash sudo bash scripts/bootstrap.sh ``` 如果服务器还没有项目代码,先执行: ```bash sudo apt-get update && sudo apt-get install -y git git clone --branch main https://gitee.com/shenmk/kfcstack.git /opt/kfcstack sudo bash /opt/kfcstack/scripts/kfcstack.sh ``` Endpoints: - Kafka: `localhost:29092` (容器内地址:`kafka:9092`) - Kafka Exporter: `localhost:9308` - Flink UI: - Flink Prometheus: `localhost:9250` - ClickHouse HTTP: - ClickHouse Prometheus: `localhost:9363/metrics` - Node Exporter: `localhost:9100/metrics` - PostgreSQL: `localhost:5432` - PostgreSQL Exporter: `postgres-exporter:9187/metrics` - Redis: `localhost:6379` - Redis Exporter: `redis-exporter:9121/metrics` - Prometheus: - Grafana: (`admin` / `admin`) - 统一入口: - Kafka UI: - Redis Commander: - pgAdmin: - WebSSH: - Docker 管理(Portainer): 启动管理栈: ```bash cp .env.management.example .env.management # 修改 PGADMIN_DEFAULT_PASSWORD docker-compose -f docker-compose.management.yml --env-file .env.management up -d ``` 当前版本默认面向可信内网,不启用 TLS、组件认证、复制和外部备份。不要把服务端口直接暴露到公网。 PostgreSQL and Redis are managed separately: ```bash cp .env.databases.example .env.databases docker-compose -f docker-compose.databases.yml --env-file .env.databases up -d ``` 数据库 exporter 会由核心栈中的 Prometheus 统一抓取。