Skip to content

Commit

Permalink
doc: update README
Browse files Browse the repository at this point in the history
Signed-off-by: Jian Zeng <[email protected]>
  • Loading branch information
knight42 committed Jan 1, 2024
1 parent ab58572 commit f84d6f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,25 @@ Configure yukid:

```bash
sudo mkdir /etc/yuki/
sudo useradd -m mirror
mkdir /tmp/repo-logs/ /tmp/repo-configs/

cat <<EOF | sudo tee /etc/yuki/daemon.toml
db_url = "/tmp/yukid.db"
listen_addr = "127.0.0.1:9999"
# uid:gid
owner = "1000:1000"
owner = "$(id -u mirror):$(id -g mirror)"
repo_logs_dir = "/tmp/repo-logs/"
repo_config_dir = "/tmp/repo-configs/"
images_upgrade_cron = "@every 1h"
EOF
```

Configure systemd service:

```bash
curl 'https://raw.githubusercontent.com/ustclug/Yuki/master/dist/yukid.service' | sudo tee /etc/systemd/system/yukid.service
curl 'https://raw.githubusercontent.com/ustclug/Yuki/master/deploy/yukid.service' | sudo tee /etc/systemd/system/yukid.service
systemctl enable yukid
systemctl start yukid
systemctl status yukid
```

Setup repository:
Expand All @@ -63,7 +58,7 @@ mkdir /tmp/repos/docker-ce
cat <<EOF > /tmp/repo-configs/docker-ce.yaml
name: docker-ce
# every 1 hour
interval: "0 * * * *"
cron: "0 * * * *"
storageDir: /tmp/repos/docker-ce
image: ustcmirror/rsync:latest
logRotCycle: 2
Expand Down
6 changes: 3 additions & 3 deletions cmd/yukid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ repo_config_dir = ["/path/to/config-dir"]
## 默认值为空
#post_sync = ["/path/to/the/program"]

## 设置更新用到的 docker images 的频率,格式为 crontab
## 默认值为 "@every 1h"
#images_upgrade_cron = "@every 1h"
## 设置更新用到的 docker images 的频率
## 默认值为 "1h"
#images_upgrade_interval = "1h"

## 同步超时时间,如果超过了这个时间,同步容器会被强制停止
## 支持使用 time.ParseDuration() 支持的时间格式,诸如 "10m", "1h" 等
Expand Down

0 comments on commit f84d6f5

Please sign in to comment.