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