54 Commits
v1.0.1 ... main

Author SHA1 Message Date
a699f12545 use-dive use-slim 2025-03-27 22:15:08 +08:00
267ecbd641 删除 syncthing 相关的 2024-12-18 16:18:01 +08:00
d42920bfb2 删除 watchtower 的 README.md 文件 2024-11-03 22:57:09 +08:00
d14ae3ad75 更新 syncthing 的 README.md,修改输出信息以包含文件夹 ID 和路径 2024-10-30 17:15:13 +08:00
ba4d7e9993 新增 easytier 的 README.md,包含启动指令和使用提示 2024-10-28 11:56:13 +08:00
9a4f51982e 更新 README.md,添加查找命令以显示 syncthing 文件夹结构 2024-10-25 10:35:59 +08:00
cae429b2a5 更新 README.md,添加 syncthing 文件夹结构输出示例 2024-10-25 10:09:22 +08:00
a856d689ba 更新 README.md,修正 syncthing Docker 命令中的挂载路径,并添加文件夹路径输出 2024-10-25 09:41:22 +08:00
42c21810d9 更新 docker-compose-pwd.yml,添加 syncthing 服务的部署副本配置 2024-10-25 09:28:30 +08:00
f17df34f81 syncthing 2024-10-25 09:25:01 +08:00
c3a7f000a9 更新 README.md,修改 syncthing Docker 命令中的挂载方式,并修正文件夹路径说明 2024-10-25 00:02:32 +08:00
64fb67731f 更新 README.md,添加 syncthing 使用示例和配置说明 2024-10-24 23:48:41 +08:00
c1a35e8a4c 更新 README.md,调整 PWD 链接;在 Docker Compose 文件中添加名称字段 2024-10-24 22:52:54 +08:00
277031ada7 更新 README.md 和 Docker Compose 配置,添加 sything 相关文档和示例 2024-10-24 22:48:53 +08:00
6b18d3acc2 添加 syncthing 的 Docker Compose 配置文件,定义两个服务及其依赖关系 2024-10-24 22:44:32 +08:00
297757ad5d 更新 syncthing 的 Docker Compose 配置,移除版本信息 2024-10-24 22:41:24 +08:00
c2558dfc0f 更新 syncthing 的 Docker Compose 配置,添加版本信息并调整服务依赖关系 2024-10-24 22:38:04 +08:00
2e76e5ea1f 添加 syncthing 的 Docker Compose 配置和 .gitignore 文件 2024-10-24 22:20:28 +08:00
112daaf47c 更新 unicloud-unison/README.md,修改数据目录路径为 /unison-unicloud-client/data 2024-10-23 09:57:48 +08:00
5e3e5a792c 更新 unicloud-unison/README.md,修改 Docker 运行命令中的数据和共享目录路径 2024-10-22 22:08:57 +08:00
652424da7e 更新 unicloud-unison/README.md,修改 Docker 运行命令中的 SYNC_INTERVAL 为 60 2024-10-22 13:14:14 +08:00
8066155d32 更新 unicloud-unison/README.md,添加 Docker 运行命令中的主机名配置 2024-10-22 09:48:37 +08:00
58d72e0fbe UNISON_PARAMS="group=true|owner=true|times=true" 2024-10-22 09:31:24 +08:00
78fcd1bc73 UNISON_PARAMS="-group -owner -times" 2024-10-22 09:22:18 +08:00
27271c2c30 更新 duplicati/README.md,添加 Docker 运行命令中的重启策略 2024-10-22 09:20:26 +08:00
44f9c3e5c3 SHARE_IGNORE="mysql.sock|.unison" 2024-10-21 23:59:26 +08:00
b0e346d7e1 unison-unicloud-client log 2024-10-21 23:48:57 +08:00
f1e7b67f88 ghcr.io/yanhao98/unicloud 2024-10-21 23:40:21 +08:00
21cfceb6c3 [play-with-docker.md] 2024-10-20 23:22:52 +08:00
c2c1b14e42 暂存 2024-10-20 22:25:57 +08:00
68deddb351 /unison-unicloud 2024-10-20 21:23:12 +08:00
c0eb66a472 unicloud-unison 时区 2024-10-20 19:56:33 +08:00
061a6912b8 play-with-docker 2024-10-20 19:46:08 +08:00
49060ce042 link: examples/client_server_replica/docker-compose.yml 2024-10-20 17:38:35 +08:00
dbd4893e91 测试同步 2024-10-20 17:00:11 +08:00
68083cb070 unicloud-unison 2024-10-20 16:38:44 +08:00
88aa77a36e duplicati --mount 2024-10-19 20:20:22 +08:00
ab16ce3d98 WATCHTOWER_ARGS --schedule 2024-10-19 19:46:07 +08:00
945c035391 watchtower 2024-10-19 13:36:15 +08:00
44051e45ea watchtower 2024-10-19 13:32:44 +08:00
cb2afc4854 在 duplicati/README.md 中添加远程访问控制部分 2024-10-18 17:41:01 +08:00
50e55f549c 更新 duplicati/README.md,将 Docker 运行命令中的 entrypoint 从 sh 修改为 bash 2024-10-18 14:22:07 +08:00
85567fc3b3 在 duplicati/README.md 中添加 duplicati-cli 帮助命令示例 2024-10-18 14:20:58 +08:00
e6ff3fbce8 在 duplicati/README.md 中添加 Docker 运行命令示例 2024-10-18 14:19:25 +08:00
1b1c42d07b 更新 duplicati/README.md,添加配置部分和邮件发送设置说明 2024-10-18 13:50:53 +08:00
475c19a782 添加 Harbor 安装和配置说明文档 2024-10-16 18:00:38 +08:00
f80a7fb8fb duplicati/README.md 2024-10-15 17:59:11 +08:00
1b31d0264b duplicati/README.md 2024-10-15 17:58:13 +08:00
84819b3e24 duplicati/README.md 2024-10-15 17:57:01 +08:00
2d1e6c19b4 在 run.sh 中添加对 DUPLICATI__WEBSERVICE_PASSWORD 的检查 2024-10-15 17:28:53 +08:00
b7df52a2b0 duplicati demo 2024-10-15 17:25:58 +08:00
d5565358e3 更新 README.md 2024-10-15 11:12:24 +08:00
553d415123 更新 README.md 2024-10-15 10:59:14 +08:00
5a3522f16e 更新 2024-10-15 09:46:06 +08:00
6 changed files with 265 additions and 1 deletions

View File

@ -1,5 +1,27 @@
# docker-example
## [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/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"`
> ```
> docker run -it --entrypoint sing-box monius/docker-warp-socks:latest version
> ```
ssh 需要加参数` -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedAlgorithms=+ssh-rsa`
```bash
ssh ip172-18-0-122-cs6efd291nsg0094ibog@direct.labs.play-with-docker.com -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedAlgorithms=+ssh-rsa
```
---
## [multiarch/qemu-user-static](https://github.com/multiarch/qemu-user-static)
```bash
docker run --rm --privileged multiarch/qemu-user-static:register --reset
```
---
```
# type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
# type=pep440,pattern={{raw}},enable=${{ startsWith(github.ref, 'refs/tags/') }}
@ -10,4 +32,7 @@
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}.{{patch}}
# type=sha
```
```
[^1]: [play-with-docker/play-with-docker](https://github.com/play-with-docker/play-with-docker )

View File

@ -0,0 +1,57 @@
# Duplicati
- https://github.com/linuxserver/docker-duplicati
- https://github.com/duplicati/duplicati/blob/master/ReleaseBuilder/Resources/Docker/README.md
```bash
docker run --rm -it --entrypoint bash duplicati/duplicati:canary
/opt/duplicati/duplicati-cli help
```
## 启动
```bash
DUPLICATI_DOMAIN=❗️❗️❗️
DUPLICATI_PASSWORD=❗️❗️❗️
docker run -d -p 8500:8200 --restart unless-stopped --name duplicati_canary \
-v duplicati-data:/data \
--mount type=bind,source=~/_docker-stacks,target/_docker-stacks \
-e "TZ=Asia/Shanghai" \
-e "DUPLICATI__WEBSERVICE_ALLOWED_HOSTNAMES=$DUPLICATI_DOMAIN" \
-e "DUPLICATI__WEBSERVICE_PASSWORD=$DUPLICATI_PASSWORD" \
duplicati/duplicati:canary
docker logs -f duplicati_canary
```
## 访问
```bash
DUPLICATI_DOMAIN=$(docker inspect duplicati_canary | grep DUPLICATI__WEBSERVICE_ALLOWED_HOSTNAMES | awk -F '=' '{gsub(/",$/, "", $2); print $2}');
DUPLICATI_PASSWORD=$(docker inspect duplicati_canary | grep DUPLICATI__WEBSERVICE_PASSWORD | awk -F '=' '{gsub(/",$/, "", $2); print $2}');
URL="$DUPLICATI_DOMAIN:8500/login.html?password=$DUPLICATI_PASSWORD";
echo "🌐http://"
echo "$URL";
echo "🌐";
```
## 配置
`:8500/ngax/index.html#/settings`
```ini
--machine-id=⚠️
--send-mail-url=smtps://smtp.resend.com:2465
--send-mail-username=resend
--send-mail-password=⚠️
--send-mail-from=Duplicati <notifications@⚠️>
--send-mail-to=⚠️
--send-mail-level=Warning,Error,Fatal
--send-mail-any-operation=true
--send-mail-subject=%OPERATIONNAME% 👉🏻%PARSEDRESULT%👈🏻 for %backup-name%
--send-mail-body=%RESULT%
--send-http-url=
--send-http-result-output-format=Json
```
## Remote access control
https://app.duplicati.com/app/dashboard

View File

@ -0,0 +1,86 @@
# [unicloud](https://github.com/agarbato/unicloud) is a web interface to unison.
[play-with-docker.md](./play-with-docker.md)
## Server
### 启动服务端
```bash
mkdir -p /unison-unicloud-server/data /unison-unicloud-server/shares
chown -R 0:0 /unison-unicloud-server/data
chmod 777 /unison-unicloud-server/shares
```
```bash
SSH_PORT=2222
HTTP_PORT=5001
SERVER_UI_PASSWORD=
docker run -d --restart unless-stopped --name unison-unicloud-server \
--hostname unison-unicloud-server.oo1.dev \
-p $SSH_PORT:22 -p $HTTP_PORT:80 \
-e TZ=Asia/Shanghai \
-e USER=root -e USER_UID=0 \
-e SERVER_UI_USERNAME=unison-unicloud-admin \
-e SERVER_UI_PASSWORD=$SERVER_UI_PASSWORD \
-e ROLE=SERVER \
--mount type=bind,source=/unison-unicloud-server/data,target=/data \
--mount type=bind,source=/unison-unicloud-server/shares,target=/shares \
ghcr.io/yanhao98/unicloud:latest
docker logs -f unison-unicloud-server
```
#### 查看密码
```bash
docker inspect unison-unicloud-server | grep -A 1 -B 1 -i password
```
## Client
```bash
curl https://unison-unicloud-server.oo1.dev/status -v
```
```bash
mkdir -p /unison-unicloud-client/data
# chown -R 1000:1000 /unison-unicloud-client/data
```
```bash
CLIENT_HOSTNAME=服务器主机名
SERVER_SHARE=share1 # 需要在服务器上先创建
SOURCE1=/path/to/backup1
SERVER_PORT=2222
docker run -d --name unison-unicloud-client \
-e SHARE_IGNORE="mysql.sock|.unison" \
-e UNISON_PARAMS="group=true|owner=true|times=true" \
-e TZ=Asia/Shanghai \
-e USER=root -e USER_UID=0 \
--restart on-failure \
-e CLIENT_HOSTNAME=$CLIENT_HOSTNAME \
-e ROLE=CLIENT \
-e SERVER_HOSTNAME=unison-unicloud-server.oo1.dev \
-e SERVER_PORT=$SERVER_PORT \
-e SERVER_SHARE=$SERVER_SHARE \
-e API_PROTOCOL=https \
-e API_PORT=443 \
-e SYNC_INTERVAL=60 \
--mount type=bind,source=/unison-unicloud-client/data,target=/data \
-e CLIENT_DEST=/share \
--mount type=bind,source=$SOURCE1,target="/share$SOURCE1" \
ghcr.io/yanhao98/unicloud:latest
docker logs -f unison-unicloud-client
```
```bash
docker exec -it unison-unicloud-client tail -f /data/log/client.log
docker exec -it unison-unicloud-client tail -f /data/log/supervisord.log
docker exec -it unison-unicloud-client tail -f /data/log/unicloud-supervise-err.log
docker exec -it unison-unicloud-client tail -f /data/log/unicloud-supervise-std.log
```
```bash
docker exec -e HOME=/data -it unison-unicloud-client unison unicloud
```

View File

@ -0,0 +1,94 @@
# unicloud
[Unison](https://github.com/bcpierce00/unison/wiki/Software-for-use-with-Unison#web-interfaces) file sync web interface
[examples/client_server_replica/docker-compose.yml](https://github.com/agarbato/unicloud/blob/8e767790ada4d5c8c04dce0e06ebb3fa4a3a82a8/examples/client_server_replica/docker-compose.yml)
## 准备
1. 进入 https://labs.play-with-docker.com
2. Add new instance 两个
3. docker pull agarbato1/unison-unicloud:2.53.4
## Server
### 启动服务
```bash
mkdir -p /unison-unicloud/data /unison-unicloud/shares
chown -R 1000:1000 /unison-unicloud/data
chmod 777 /unison-unicloud/shares
docker run -d --name unison-unicloud-server \
-e TZ=Asia/Shanghai \
--network host \
-e SERVER_DEBUG=True \
-e SERVER_UI_USERNAME=admin \
-e SERVER_UI_PASSWORD= \
-e ROLE=SERVER \
--mount type=bind,source=/unison-unicloud/data,target=/data \
--mount type=bind,source=/unison-unicloud/shares,target=/shares \
agarbato1/unison-unicloud:2.53.4 \
bash -c "echo 'Port 2222' >> /etc/sshd_config_debug && exec python3 -u start.py"
```
<details>
<summary>检查连接和配置</summary>
#### 检查是否能ping通client
```bash
CLIENT_IP="192.168.0.17"
docker exec -it server ping -c 1 $CLIENT_IP
```
#### 检查sshd配置
```bash
docker exec -it server cat /etc/sshd_config_debug
```
#### 查看sshd日志
```bash
cat ~/data/log/sshd.log
```
</details>
### 添加 share1
-`labs``Open Port`打开 80 端口
- 跳转后打开 http://ip172-18-0-23-csabksol2o90009mnang-80.direct.labs.play-with-docker.com`/shares`
- `Create Folder``No`
## Client
```bash
curl 192.168.0.18:80/status -v
mkdir -p /unison-unicloud/data /unison-unicloud/share
chown -R 1000:1000 /unison-unicloud/data
docker run -d --name unison-unicloud-client \
-e TZ=Asia/Shanghai \
--restart on-failure \
--network host \
-e CLIENT_HOSTNAME=client_hostname1 \
-e ROLE=CLIENT \
-e SERVER_HOSTNAME=192.168.0.18 \
-e SERVER_PORT=2222 \
-e SERVER_SHARE=share1 \
-e API_PROTOCOL=http \
-e API_PORT=80 \
-e SYNC_INTERVAL=15 \
--mount type=bind,source=/unison-unicloud/data,target=/data \
-e CLIENT_DEST=/share \
--mount type=bind,source=/unison-unicloud/share,target=/share \
agarbato1/unison-unicloud:2.53.4
docker logs -f unison-unicloud-client
```
### 激活
进 http://ip172-18-0-23-csabksol2o90009mnang-80.direct.labs.play-with-docker.com/`clients`,点击`ACTIVATE`
## 测试同步
```
touch /unison-unicloud/share/$(date +%s).txt
```
```bash
docker exec -it server ls /shares/share1
```

1
use-dive/README.md Normal file
View File

@ -0,0 +1 @@
- https://github.com/wagoodman/dive/blob/main/README.md#basic-features

1
use-slim/README.md Normal file
View File

@ -0,0 +1 @@
- https://github.com/slimtoolkit/slim