mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-20 20:22:46 +00:00
add example of worker config
This commit is contained in:
parent
23bf4890cc
commit
e1c0c25efa
@ -100,3 +100,5 @@ $ tunasync worker --help
|
|||||||
```
|
```
|
||||||
|
|
||||||
可以看一下 log 目录
|
可以看一下 log 目录
|
||||||
|
|
||||||
|
一些 worker 配置文件示例 [workers.conf](workers.conf)
|
||||||
|
77
docs/zh_CN/workers.conf
Normal file
77
docs/zh_CN/workers.conf
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
|
||||||
|
[global]
|
||||||
|
name = "mirror_worker"
|
||||||
|
log_dir = "/srv/tunasync/log/tunasync/{{.Name}}"
|
||||||
|
mirror_dir = "/srv/tunasync"
|
||||||
|
concurrent = 10
|
||||||
|
interval = 1
|
||||||
|
|
||||||
|
[manager]
|
||||||
|
api_base = "http://localhost:12345"
|
||||||
|
token = "some_token"
|
||||||
|
ca_cert = ""
|
||||||
|
|
||||||
|
[cgroup]
|
||||||
|
enable = false
|
||||||
|
base_path = "/sys/fs/cgroup"
|
||||||
|
group = "tunasync"
|
||||||
|
|
||||||
|
[server]
|
||||||
|
hostname = "localhost"
|
||||||
|
listen_addr = "127.0.0.1"
|
||||||
|
listen_port = 6000
|
||||||
|
ssl_cert = ""
|
||||||
|
ssl_key = ""
|
||||||
|
|
||||||
|
[[mirrors]]
|
||||||
|
name = "adobe-fonts"
|
||||||
|
interval = 1440
|
||||||
|
provider = "command"
|
||||||
|
upstream = "https://github.com/adobe-fonts"
|
||||||
|
#https://github.com/tuna/tunasync-scripts/blob/master/adobe-fonts.sh
|
||||||
|
command = "/home/scripts/adobe-fonts.sh"
|
||||||
|
docker_image = "tunathu/tunasync-scripts:latest"
|
||||||
|
|
||||||
|
[[mirrors]]
|
||||||
|
name = "anaconda"
|
||||||
|
provider = "command"
|
||||||
|
upstream = "https://repo.continuum.io/"
|
||||||
|
#https://github.com/tuna/tunasync-scripts/blob/master/anaconda.py
|
||||||
|
command = "/home/scripts/anaconda.py"
|
||||||
|
interval = 1440
|
||||||
|
docker_image = "tunathu/tunasync-scripts:latest"
|
||||||
|
|
||||||
|
[[mirrors]]
|
||||||
|
name = "gnu"
|
||||||
|
provider = "rsync"
|
||||||
|
upstream = "rsync://mirrors.ocf.berkeley.edu/gnu/"
|
||||||
|
memory_limit = "256M"
|
||||||
|
|
||||||
|
[[mirrors]]
|
||||||
|
name = "pypi"
|
||||||
|
provider = "command"
|
||||||
|
upstream = "https://pypi.python.org/"
|
||||||
|
#https://github.com/tuna/tunasync-scripts/blob/master/pypi.sh
|
||||||
|
command = "/home/scripts/pypi.sh"
|
||||||
|
docker_image = "tunathu/tunasync-scripts:latest"
|
||||||
|
interval = 5
|
||||||
|
# set environment varialbes
|
||||||
|
[mirrors.env]
|
||||||
|
INIT = "0"
|
||||||
|
|
||||||
|
|
||||||
|
[[mirrors]]
|
||||||
|
name = "debian"
|
||||||
|
interval = 720
|
||||||
|
provider = "rsync"
|
||||||
|
upstream = "rsync://mirrors.tuna.tsinghua.edu.cn/debian/"
|
||||||
|
memory_limit = "256M"
|
||||||
|
|
||||||
|
[[mirrors]]
|
||||||
|
name = "ubuntu"
|
||||||
|
provider = "two-stage-rsync"
|
||||||
|
stage1_profile = "debian"
|
||||||
|
upstream = "rsync://archive.ubuntu.com/ubuntu/"
|
||||||
|
memory_limit = "256M"
|
||||||
|
|
||||||
|
# vim: ft=toml
|
Loading…
x
Reference in New Issue
Block a user