更新 README.md,修正 syncthing Docker 命令中的挂载路径,并添加文件夹路径输出

This commit is contained in:
严浩
2024-10-25 09:41:22 +08:00
parent 42c21810d9
commit a856d689ba

View File

@ -1,4 +1,4 @@
# sything
****# sything
[![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
@ -9,14 +9,16 @@ wget https://raw.githubusercontent.com/yanhao98/docker-example/refs/heads/main/s
HOSTNAME=服务器主机名
SOURCE1=/path/to/backup1
TARGET1="/host$SOURCE1"
docker run -d --restart unless-stopped --name syncthing \
-h $HOSTNAME \
--mount type=bind,source=$SOURCE1,target="/host$SOURCE1" \
--mount type=bind,source=$SOURCE1,target=$TARGET1 \
--mount type=volume,source=st-sync-cfg,target=/var/syncthing/config \
-e PUID=0 -e PGID=0 \
-e TZ=Asia/Shanghai \
-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
echo -e "\n Folder Path: $TARGET1 \n"
```
- 访问`https://服务器ip:28198`