From 64fb67731f7a3cf87c8b8d8e068a316852ec3e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= <37316281+yanhao98@users.noreply.github.com> Date: Thu, 24 Oct 2024 23:48:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20README.md=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20syncthing=20=E4=BD=BF=E7=94=A8=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E5=92=8C=E9=85=8D=E7=BD=AE=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stacks/sything/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/stacks/sything/README.md b/stacks/sything/README.md index 45e644c..a627d91 100644 --- a/stacks/sything/README.md +++ b/stacks/sything/README.md @@ -2,4 +2,27 @@ [![Try in PWD](https://raw.githubusercontent.com/play-with-docker/stacks/master/assets/images/button.png)](http://play-with-docker.com?stack=https://raw.githubusercontent.com/yanhao98/docker-example/refs/heads/main/stacks/sything/docker-compose-pwd.yml) ```bash wget https://raw.githubusercontent.com/yanhao98/docker-example/refs/heads/main/stacks/sything/docker-compose.yml && docker-compose up -d +``` + +## st-1 +```bash +HOSTNAME=服务器主机名 +SOURCE1=/path/to/backup1 + +docker run -d --restart unless-stopped --name syncthing \ + -h $HOSTNAME \ + -v $SOURCE1:/host$SOURCE1 \ + --mount type=volume,source=st-sync-cfg,target=/var/syncthing/config \ + -e PUID=0 -e PGID=0 \ + -e TZ=Asia/Shanghai \ + -p 28198:8384 -p 22000:22000/tcp -p 22000:22000/udp -p 21027:21027/udp \ + syncthing/syncthing +``` + +- 访问`https://服务器ip:28198` +- 设置用户名密码 +- 添加文件夹: 文件夹路径固定填`/host` + +```bash +docker exec -it syncthing find /host -maxdepth 3 ``` \ No newline at end of file