更新 README.md 和 Docker Compose 配置,添加 sything 相关文档和示例

This commit is contained in:
严浩
2024-10-24 22:48:53 +08:00
parent 6b18d3acc2
commit 277031ada7
4 changed files with 10 additions and 24 deletions

View File

@ -2,7 +2,7 @@
## [Play With Docker](http://labs.play-with-docker.com/)[^1]
[![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/Mon-ius/Docker-Warp-Socks/main/dev/warp-socks.yml)
[![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)
> Click the *CLOSE* button, Replace the $IP with the given one on the top side, then run:
> `curl -x "socks5h://$IP:9091" -fsSL "https://www.cloudflare.com/cdn-cgi/trace"`
> ```

5
stacks/sything/README.md Normal file
View File

@ -0,0 +1,5 @@
# 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.yml)
```bash
wget https://raw.githubusercontent.com/yanhao98/docker-example/refs/heads/main/stacks/sything/docker-compose.yml && docker-compose up -d
```

View File

@ -1,7 +1,4 @@
---
volumes:
st-sync-1-cfg:
st-sync-2-cfg:
x-common-configuration: &common-configuration
image: syncthing/syncthing
environment:
@ -11,8 +8,6 @@ x-common-configuration: &common-configuration
restart: unless-stopped
healthcheck:
test: curl -fkLsS -m 2 127.0.0.1:8384/rest/noauth/health | grep -o --color=never OK || exit 1
# interval: 1m
# timeout: 10s
interval: 10s
timeout: 5s
retries: 3
@ -22,29 +17,16 @@ services:
hostname: my-syncthing-1
volumes:
- /root/st-sync-1-folder:/st-folder
- type: volume
source: st-sync-1-cfg
target: /var/syncthing/config
- /root/st-sync-1-cfg:/var/syncthing/config
ports:
- 28001:8384 # Web UI
# - 22000:22000/tcp # TCP file transfers
# - 22000:22000/udp # QUIC file transfers
# - 21027:21027/udp # Receive local discovery broadcasts
restart: unless-stopped
- 28001:8384
syncthing-2:
depends_on:
# syncthing-1:
# condition: service_healthy # v3 版本中已经被移除,只能通过一些额外的健康检查工具或者脚本来实现类似效果。
- syncthing-1
<<: *common-configuration
hostname: my-syncthing-2
volumes:
- /root/st-sync-2-folder:/st-folder
- type: volume
source: st-sync-2-cfg
target: /var/syncthing/config
- /root/st-sync-2-cfg:/var/syncthing/config
ports:
- 28002:8384 # Web UI
# - 22000:22000/tcp # TCP file transfers
# - 22000:22000/udp # QUIC file transfers
# - 21027:21027/udp # Receive local discovery broadcasts
- 28002:8384

View File

@ -30,7 +30,6 @@ services:
# - 22000:22000/tcp # TCP file transfers
# - 22000:22000/udp # QUIC file transfers
# - 21027:21027/udp # Receive local discovery broadcasts
restart: unless-stopped
syncthing-2:
depends_on:
# syncthing-1: