mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 11:52:08 +08:00
1. [单机部署手册.md]docker-compose部署方式添加注释描述
This commit is contained in:
@@ -90,10 +90,50 @@ helm pull knowstreaming/knowstreaming-manager
|
|||||||
|
|
||||||
|
|
||||||
#### 2.1.3.2、Docker Compose
|
#### 2.1.3.2、Docker Compose
|
||||||
```yml
|
**环境依赖**
|
||||||
version: "3"
|
|
||||||
|
- [Docker](https://docs.docker.com/engine/install/)
|
||||||
|
- [Docker Compose](https://docs.docker.com/compose/install/)
|
||||||
|
|
||||||
|
|
||||||
|
**安装命令**
|
||||||
|
```bash
|
||||||
|
# `v3.0.0-beta.2`版本开始,默认账号密码为`admin` / `admin`;
|
||||||
# https://hub.docker.com/u/knowstreaming 在此处寻找最新镜像版本
|
# https://hub.docker.com/u/knowstreaming 在此处寻找最新镜像版本
|
||||||
# mysql与es可以使用自己搭建的服务,调整对应配置即可
|
# mysql与es可以使用自己搭建的服务,调整对应配置即可
|
||||||
|
|
||||||
|
# 复制docker-compose.yml到指定位置后执行下方命令即可启动
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
**验证安装**
|
||||||
|
```shell
|
||||||
|
docker-compose ps
|
||||||
|
# 验证启动 - 状态为 UP 则表示成功
|
||||||
|
Name Command State Ports
|
||||||
|
----------------------------------------------------------------------------------------------------
|
||||||
|
elasticsearch-single /usr/local/bin/docker-entr ... Up 9200/tcp, 9300/tcp
|
||||||
|
knowstreaming-init /bin/bash /es_template_cre ... Up
|
||||||
|
knowstreaming-manager /bin/sh /ks-start.sh Up 80/tcp
|
||||||
|
knowstreaming-mysql /entrypoint.sh mysqld Up (health: starting) 3306/tcp, 33060/tcp
|
||||||
|
knowstreaming-ui /docker-entrypoint.sh ngin ... Up 0.0.0.0:80->80/tcp
|
||||||
|
|
||||||
|
# 稍等一分钟左右 knowstreaming-init 会退出,表示es初始化完成,可以访问页面
|
||||||
|
Name Command State Ports
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
knowstreaming-init /bin/bash /es_template_cre ... Exit 0
|
||||||
|
knowstreaming-mysql /entrypoint.sh mysqld Up (healthy) 3306/tcp, 33060/tcp
|
||||||
|
```
|
||||||
|
|
||||||
|
**访问**
|
||||||
|
```http request
|
||||||
|
http://127.0.0.1:80/
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
**docker-compose.yml**
|
||||||
|
```yml
|
||||||
|
version: "2"
|
||||||
services:
|
services:
|
||||||
# *不要调整knowstreaming-manager服务名称,ui中会用到
|
# *不要调整knowstreaming-manager服务名称,ui中会用到
|
||||||
knowstreaming-manager:
|
knowstreaming-manager:
|
||||||
@@ -124,11 +164,11 @@ services:
|
|||||||
# 服务JVM参数
|
# 服务JVM参数
|
||||||
JAVA_OPTS: -Xmx1g -Xms1g
|
JAVA_OPTS: -Xmx1g -Xms1g
|
||||||
# 对于kafka中ADVERTISED_LISTENERS填写的hostname可以通过该方式完成
|
# 对于kafka中ADVERTISED_LISTENERS填写的hostname可以通过该方式完成
|
||||||
# extra_hosts:
|
# extra_hosts:
|
||||||
# - "hostname:x.x.x.x"
|
# - "hostname:x.x.x.x"
|
||||||
# 服务日志路径
|
# 服务日志路径
|
||||||
# volumes:
|
# volumes:
|
||||||
# - /ks/manage/log:/logs
|
# - /ks/manage/log:/logs
|
||||||
knowstreaming-ui:
|
knowstreaming-ui:
|
||||||
image: knowstreaming/knowstreaming-ui:0.2.0-test1
|
image: knowstreaming/knowstreaming-ui:0.2.0-test1
|
||||||
container_name: knowstreaming-ui
|
container_name: knowstreaming-ui
|
||||||
@@ -139,8 +179,8 @@ services:
|
|||||||
TZ: Asia/Shanghai
|
TZ: Asia/Shanghai
|
||||||
depends_on:
|
depends_on:
|
||||||
- knowstreaming-manager
|
- knowstreaming-manager
|
||||||
# extra_hosts:
|
# extra_hosts:
|
||||||
# - "hostname:x.x.x.x"
|
# - "hostname:x.x.x.x"
|
||||||
elasticsearch-single:
|
elasticsearch-single:
|
||||||
image: docker.io/library/elasticsearch:7.6.2
|
image: docker.io/library/elasticsearch:7.6.2
|
||||||
container_name: elasticsearch-single
|
container_name: elasticsearch-single
|
||||||
@@ -148,9 +188,9 @@ services:
|
|||||||
expose:
|
expose:
|
||||||
- 9200
|
- 9200
|
||||||
- 9300
|
- 9300
|
||||||
# ports:
|
# ports:
|
||||||
# - '9200:9200'
|
# - '9200:9200'
|
||||||
# - '9300:9300'
|
# - '9300:9300'
|
||||||
environment:
|
environment:
|
||||||
TZ: Asia/Shanghai
|
TZ: Asia/Shanghai
|
||||||
# es的JVM参数
|
# es的JVM参数
|
||||||
@@ -158,14 +198,14 @@ services:
|
|||||||
# 单节点配置,多节点集群参考 https://www.elastic.co/guide/en/elasticsearch/reference/7.6/docker.html#docker-compose-file
|
# 单节点配置,多节点集群参考 https://www.elastic.co/guide/en/elasticsearch/reference/7.6/docker.html#docker-compose-file
|
||||||
discovery.type: single-node
|
discovery.type: single-node
|
||||||
# 数据持久化路径
|
# 数据持久化路径
|
||||||
# volumes:
|
# volumes:
|
||||||
# - /ks/es/data:/usr/share/elasticsearch/data
|
# - /ks/es/data:/usr/share/elasticsearch/data
|
||||||
|
|
||||||
# es初始化服务,与manager使用同一镜像
|
# es初始化服务,与manager使用同一镜像
|
||||||
# 首次启动es需初始化模版和索引,后续会自动创建
|
# 首次启动es需初始化模版和索引,后续会自动创建
|
||||||
knowstreaming-init:
|
knowstreaming-init:
|
||||||
image: knowstreaming/knowstreaming-manager:0.2.0-test
|
image: knowstreaming/knowstreaming-manager:0.2.0-test
|
||||||
container_name: knowstreaming_init
|
container_name: knowstreaming-init
|
||||||
depends_on:
|
depends_on:
|
||||||
- elasticsearch-single
|
- elasticsearch-single
|
||||||
command:
|
command:
|
||||||
@@ -190,8 +230,8 @@ services:
|
|||||||
MYSQL_ROOT_HOST: '%'
|
MYSQL_ROOT_HOST: '%'
|
||||||
expose:
|
expose:
|
||||||
- 3306
|
- 3306
|
||||||
# ports:
|
# ports:
|
||||||
# - '3306:3306'
|
# - '3306:3306'
|
||||||
# 数据持久化路径
|
# 数据持久化路径
|
||||||
# volumes:
|
# volumes:
|
||||||
# - /ks/mysql/data:/data/mysql
|
# - /ks/mysql/data:/data/mysql
|
||||||
|
|||||||
Reference in New Issue
Block a user