mirror of
https://github.com/yanhao98/docker-example.git
synced 2025-07-13 04:00:47 +08:00
ghcr.io/yanhao98/unicloud
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
### 启动服务端
|
||||
```bash
|
||||
mkdir -p /unison-unicloud/data /unison-unicloud/shares
|
||||
chown -R 1000:1000 /unison-unicloud/data
|
||||
chown -R 0:0 /unison-unicloud/data
|
||||
chmod 777 /unison-unicloud/shares
|
||||
```
|
||||
|
||||
@ -19,12 +19,13 @@ SERVER_UI_PASSWORD=
|
||||
docker run -d --restart unless-stopped --name unison-unicloud-server \
|
||||
-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/data,target=/data \
|
||||
--mount type=bind,source=/unison-unicloud/shares,target=/shares \
|
||||
agarbato1/unison-unicloud:2.53.4
|
||||
ghcr.io/yanhao98/unicloud:latest
|
||||
docker logs -f unison-unicloud-server
|
||||
```
|
||||
|
||||
@ -42,28 +43,30 @@ curl https://unison-unicloud-server.oo1.dev/status -v
|
||||
|
||||
```bash
|
||||
mkdir -p /unison-unicloud/data
|
||||
chown -R 1000:1000 /unison-unicloud/data
|
||||
# chown -R 1000:1000 /unison-unicloud/data
|
||||
```
|
||||
|
||||
```bash
|
||||
CLIENT_HOSTNAME=服务器主机名
|
||||
SERVER_SHARE=share1
|
||||
SHARE_PATH_SOURCE=/unison-unicloud/share
|
||||
SERVER_SHARE=share1 # 需要在服务器上先创建
|
||||
SOURCE1=/path/to/backup1
|
||||
SERVER_PORT=2222
|
||||
|
||||
docker run -d --name unison-unicloud-client \
|
||||
-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=2222 \
|
||||
-e SERVER_PORT=$SERVER_PORT \
|
||||
-e SERVER_SHARE=$SERVER_SHARE \
|
||||
-e API_PROTOCOL=https \
|
||||
-e API_PORT=443 \
|
||||
-e SYNC_INTERVAL=15 \
|
||||
--mount type=bind,source=/unison-unicloud/data,target=/data \
|
||||
-e CLIENT_DEST=/share \
|
||||
--mount type=bind,source=$SHARE_PATH_SOURCE,target=/share \
|
||||
agarbato1/unison-unicloud:2.53.4
|
||||
--mount type=bind,source=$SOURCE1,target="/share$SOURCE1" \
|
||||
ghcr.io/yanhao98/unicloud:latest
|
||||
docker logs -f unison-unicloud-client
|
||||
```
|
Reference in New Issue
Block a user