前面我们用docker方式安装了HertzBeat,现在我们自己写个docker-compose.yml文件、创建文件直接docker-compose up -d
直接启动运行
使用docker-compose需要先安装docker和docker-compose
1、输入以下两段命令
mkdir 123 && cd 123 && mkdir data && mkdir logs && wget https://gitee.com/dromara/hertzbeat/raw/master/script/application.yml && wget https://gitee.com/dromara/hertzbeat/raw/master/script/sureness.yml
cat <<EOF > docker-compose.yml
version: '3'
services:
HertzBeat:
image: tancloud/hertzbeat
ports:
- "1157:1157"
- "1158:1158"
volumes:
- ./data:/opt/hertzbeat/data
- ./logs:/opt/hertzbeat/logs
- ./application.yml:/opt/hertzbeat/config/application.yml
- ./sureness.yml:/opt/hertzbeat/config/sureness.yml
environment:
- LANG=zh_CN.UTF-8
- TZ=Asia/Shanghai
EOF
2、访问 http://IP:1157
安装完成!