centraldogma git 镜像配置

git 镜像的场景主要是将git repo 同步到centraldogma 中,配置还是比较简单的,主要是关于定时任务,centraldogma repo 关联,账户信息

参考运行

  • centraldogma 环境
version: "3"
services: 
    app:
        image: line/centraldogma
        ports: 
        - "36462:36462"
  • 配置镜像
    主要在项目中的meta repo 添加/mirrors.json 信息
    参考

 

 

配置内容

 
[
  {
    "type": "single",
    "enabled": true,
    "schedule": "0 * * * * ?",
    "direction": "REMOTE_TO_LOCAL",
    "localRepo": "demo",
    "localPath": "/",
    "remoteUri": "git+http://<git-repo>"
  }
]
  • 效果

 

 

说明

以上没有包含账户配置的,具体可以参考官方文档,同时我们基于镜像模式可以实现强大的配置读取,监听。。。

参考资料

https://line.github.io/centraldogma/mirroring.html

posted on 2021-08-12 22:49  荣锋亮  阅读(199)  评论(0编辑  收藏  举报

导航