-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update README and template TOML
- Loading branch information
Showing
2 changed files
with
106 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,71 @@ | ||
debug = false | ||
## 设置 debug 为 true 后会打开 echo web 框架的 debug 模式 | ||
## 以及在日志里输出程序里打印日志的位置 | ||
#debug = true | ||
|
||
listen_addr = "127.0.0.1:9999" | ||
db_url = "/home/mirror/yukid.db" | ||
repo_config_dir = "/home/mirror/repos/" | ||
## 设置 sqlite 数据库文件的路径 | ||
## 格式可以是文件路径或者是 url(如果需要设置特定参数的话)。例如: | ||
## /var/run/yukid/data.db | ||
## file:///home/fred/data.db?mode=ro&cache=private | ||
## 参考 https://www.sqlite.org/c3ref/open.html | ||
db_url = "/path/to/yukid.db" | ||
|
||
fs = "zfs" | ||
## 每个仓库的同步配置存放的文件夹 | ||
## 每个配置的后缀名必须是 `.yaml` | ||
## 配置的格式参考下方 Repo Configuration | ||
repo_config_dir = ["/path/to/config-dir"] | ||
|
||
# uid:gid | ||
owner = "1000:1000" | ||
## 设置同步日志存放的文件夹 | ||
## 默认值是 /var/log/yuki/ | ||
#repo_logs_dir = "/var/log/yuki/" | ||
|
||
log_file = "/home/mirror/log/yukid.log" | ||
repo_logs_dir = "/home/mirror/log/" | ||
log_level = "error" | ||
## 数据所在位置的文件系统 | ||
## 可选的值为 "zfs" | "xfs" | "default" | ||
## 影响获取仓库大小的方式,如果是 "default" 的话仓库大小恒为 `-1` | ||
## 默认值是 "default" | ||
#fs = "default" | ||
|
||
bind_ip = "0.0.0.0" | ||
## 设置 Docker Daemon 地址 | ||
## unix local socket: unix:///var/run/docker.sock | ||
## tcp: tcp://127.0.0.1:2375 | ||
## 默认值是 "unix:///var/run/docker.sock" | ||
#docker_endpoint = "unix:///var/run/docker.sock" | ||
|
||
name_prefix = "syncing-" | ||
## 设置同步程序的运行时的 uid 跟 gid,会影响仓库文件的 uid 跟 gid | ||
## 格式为 uid:gid | ||
## 默认值是 yukid 进程的 uid 跟 gid | ||
#owner = "1000:1000" | ||
|
||
images_upgrade_interval = "1h" | ||
## 设置 yukid 的日志文件 | ||
## 默认值是 "/dev/stderr" | ||
#log_file = "/path/to/yukid.log" | ||
|
||
post_sync = ["/home/mirror/scripts/post_sync.sh"] | ||
## 设置 log level | ||
## 可选的值为 "debug" | "info" | "warn" | "error" | ||
## 默认值是 "info" | ||
#log_level = "info" | ||
|
||
sync_timeout = "48h" | ||
## 设置监听地址 | ||
## 默认值是 "127.0.0.1:9999" | ||
#listen_addr = "127.0.0.1:9999" | ||
|
||
## 设置同步仓库的时候默认绑定的 IP | ||
## 默认值为空,即不绑定 | ||
#bind_ip = "1.2.3.4" | ||
|
||
## 设置创建的 container 的名字前缀 | ||
## 默认值是 "syncing-" | ||
#name_prefix = "syncing-" | ||
|
||
## 设置同步完后执行的命令 | ||
## 默认值为空 | ||
#post_sync = ["/path/to/the/program"] | ||
|
||
## 设置更新用到的 docker images 的频率 | ||
## 默认值为 "1h" | ||
#images_upgrade_interval = "1h" | ||
|
||
## 同步超时时间,如果超过了这个时间,同步容器会被强制停止 | ||
## 支持使用 time.ParseDuration() 支持的时间格式,诸如 "10m", "1h" 等 | ||
## 如果为 0 的话则不会超时。注意修改的配置仅对新启动的同步容器生效 | ||
## 默认值为 0 | ||
#sync_timeout = "48h" |