# configDeliverClient 配置分发客户端
# 下载地址
# 配置文件
# config.yaml 位于应用同级目录
logger:
level: "info"
stdout: true
apiServer: http://config.lidong.xin/getconfig # api server address
tasks:
- name: "5472E3F6-37DE-B9A0-899C-39838E8C1336" # 任务名称
file: "*" # 文件名
corn: "@every 1m" # corn表达式
localDir: "./localDir/5472E3F6-37DE-B9A0-899C-39838E8C1336" # 本地目录
isRunOnStart: true # 是否启动时执行一次
# systemd 部署
本部署方式仅支持 linux 系统,且需要安装 systemd.
# 在线安装
进入要安装到的目录,执行以下命令
curl -sSL https://gitee.com/hjmcloud/scripts/raw/master/config-deliver-client/systemd/config-deliver-client-install.sh | sh
# 在线卸载
curl -sSL https://gitee.com/hjmcloud/scripts/raw/master/config-deliver-client/systemd/config-deliver-client-uninstall.sh | sh
# 管理服务
# 启动服务
systemctl start config-deliver-client
# 停止服务
systemctl stop config-deliver-client
# 重启服务
systemctl restart config-deliver-client
# 查看服务状态
systemctl status config-deliver-client
# 查看服务日志
journalctl -u config-deliver-client -f
# Docker compose 部署
下载示例文件
wget https://gitee.com/hjmcloud/config-deliver-client/raw/master/docker-compose.yml -O docker-compose.yml
wget https://gitee.com/hjmcloud/config-deliver-client/raw/master/config.yaml -O config.yaml
目录结构如下
.
├── config.yaml
└── docker-compose.yml
# docker-compose.yml
version: "3.7"
services:
config-deliver-client:
image: hjmcloud/config-deliver-client:latest
container_name: config-deliver-client
restart: always
volumes:
- ./config.yaml:/app/config.yaml
- ./localDir:/app/localDir
environment:
- TZ=Asia/Shanghai
# GoFrame Template For SingleRepo
Project Makefile Commands:
make cli: Install or Update to the latest GoFrame CLI tool.make dao: Generate go files forEntity/DAO/DOaccording to the configuration file fromhackfolder.make service: Parselogicfolder to generate interface go files intoservicefolder.make image TAG=xxx: Rundocker buildto build image accordingmanifest/docker.make image.push TAG=xxx: Rundocker buildanddocker pushto build and push image accordingmanifest/docker.make deploy TAG=xxx: Runkustomize buildto build and deploy deployment to kubernetes server group accordingmanifest/deploy.make bin.publish: build and publish binary files to gitee pages.