mirror of
https://github.com/yanhao98/docker-example.git
synced 2025-07-12 23:50:49 +08:00
更新 README.md 和 Docker Compose 配置,添加 sything 相关文档和示例
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## [Play With Docker](http://labs.play-with-docker.com/)[^1]
|
## [Play With Docker](http://labs.play-with-docker.com/)[^1]
|
||||||
|
|
||||||
[](http://play-with-docker.com?stack=https://raw.githubusercontent.com/Mon-ius/Docker-Warp-Socks/main/dev/warp-socks.yml)
|
[](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:
|
> 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"`
|
> `curl -x "socks5h://$IP:9091" -fsSL "https://www.cloudflare.com/cdn-cgi/trace"`
|
||||||
> ```
|
> ```
|
||||||
|
5
stacks/sything/README.md
Normal file
5
stacks/sything/README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# sything
|
||||||
|
[](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
|
||||||
|
```
|
@ -1,7 +1,4 @@
|
|||||||
---
|
---
|
||||||
volumes:
|
|
||||||
st-sync-1-cfg:
|
|
||||||
st-sync-2-cfg:
|
|
||||||
x-common-configuration: &common-configuration
|
x-common-configuration: &common-configuration
|
||||||
image: syncthing/syncthing
|
image: syncthing/syncthing
|
||||||
environment:
|
environment:
|
||||||
@ -11,8 +8,6 @@ x-common-configuration: &common-configuration
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: curl -fkLsS -m 2 127.0.0.1:8384/rest/noauth/health | grep -o --color=never OK || exit 1
|
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
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
@ -22,29 +17,16 @@ services:
|
|||||||
hostname: my-syncthing-1
|
hostname: my-syncthing-1
|
||||||
volumes:
|
volumes:
|
||||||
- /root/st-sync-1-folder:/st-folder
|
- /root/st-sync-1-folder:/st-folder
|
||||||
- type: volume
|
- /root/st-sync-1-cfg:/var/syncthing/config
|
||||||
source: st-sync-1-cfg
|
|
||||||
target: /var/syncthing/config
|
|
||||||
ports:
|
ports:
|
||||||
- 28001:8384 # Web UI
|
- 28001:8384
|
||||||
# - 22000:22000/tcp # TCP file transfers
|
|
||||||
# - 22000:22000/udp # QUIC file transfers
|
|
||||||
# - 21027:21027/udp # Receive local discovery broadcasts
|
|
||||||
restart: unless-stopped
|
|
||||||
syncthing-2:
|
syncthing-2:
|
||||||
depends_on:
|
depends_on:
|
||||||
# syncthing-1:
|
|
||||||
# condition: service_healthy # v3 版本中已经被移除,只能通过一些额外的健康检查工具或者脚本来实现类似效果。
|
|
||||||
- syncthing-1
|
- syncthing-1
|
||||||
<<: *common-configuration
|
<<: *common-configuration
|
||||||
hostname: my-syncthing-2
|
hostname: my-syncthing-2
|
||||||
volumes:
|
volumes:
|
||||||
- /root/st-sync-2-folder:/st-folder
|
- /root/st-sync-2-folder:/st-folder
|
||||||
- type: volume
|
- /root/st-sync-2-cfg:/var/syncthing/config
|
||||||
source: st-sync-2-cfg
|
|
||||||
target: /var/syncthing/config
|
|
||||||
ports:
|
ports:
|
||||||
- 28002:8384 # Web UI
|
- 28002:8384
|
||||||
# - 22000:22000/tcp # TCP file transfers
|
|
||||||
# - 22000:22000/udp # QUIC file transfers
|
|
||||||
# - 21027:21027/udp # Receive local discovery broadcasts
|
|
@ -30,7 +30,6 @@ services:
|
|||||||
# - 22000:22000/tcp # TCP file transfers
|
# - 22000:22000/tcp # TCP file transfers
|
||||||
# - 22000:22000/udp # QUIC file transfers
|
# - 22000:22000/udp # QUIC file transfers
|
||||||
# - 21027:21027/udp # Receive local discovery broadcasts
|
# - 21027:21027/udp # Receive local discovery broadcasts
|
||||||
restart: unless-stopped
|
|
||||||
syncthing-2:
|
syncthing-2:
|
||||||
depends_on:
|
depends_on:
|
||||||
# syncthing-1:
|
# syncthing-1:
|
||||||
|
Reference in New Issue
Block a user