From a283320eff4cb3fe403349cdf13e884b5bc2c744 Mon Sep 17 00:00:00 2001 From: xiaoyaofenfen <1254525673@qq.com> Date: Thu, 29 Sep 2022 19:26:20 +0800 Subject: [PATCH] update document for webdav --- README.md | 3 ++- docker/webdav/Dockerfile | 1 + docker/webdav/app.sh | 2 +- docker/webdav/docker-compose.yml | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5da7a3e..062d0d8 100644 --- a/README.md +++ b/README.md @@ -94,12 +94,13 @@ ALIYUNPAN_SYNC_MODE:备份模式,支持三种: upload(备份本地文件到 ### webdav共享盘 让阿里云盘变身为webdav协议的文件服务器。这样使用webdav客户端软件,你可以把阿里云盘挂载为Windows、Linux、Mac系统的磁盘,可以通过NAS系统做文件管理或文件同步等等。 ``` -docker run -d --name=aliyunpan-webdav --restart=always -p 23077:23077 -e TZ="Asia/Shanghai" -e ALIYUNPAN_REFRESH_TOKEN="" -e ALIYUNPAN_AUTH_USER="admin" -e ALIYUNPAN_AUTH_PASSWORD="admin" -e ALIYUNPAN_PAN_DRIVE="File" -e ALIYUNPAN_PAN_DIR="/" tickstep/aliyunpan-webdav:v0.2.1 +docker run -d --name=aliyunpan-webdav --restart=always -p 23077:23077 -e TZ="Asia/Shanghai" -e ALIYUNPAN_REFRESH_TOKEN="" -e ALIYUNPAN_AUTH_USER="admin" -e ALIYUNPAN_AUTH_PASSWORD="admin" -e ALIYUNPAN_WEBDAV_MODE="rw" -e ALIYUNPAN_PAN_DRIVE="File" -e ALIYUNPAN_PAN_DIR="/" tickstep/aliyunpan-webdav:v0.2.1 ALIYUNPAN_REFRESH_TOKEN RefreshToken ALIYUNPAN_AUTH_USER webdav登录用户名 ALIYUNPAN_AUTH_PASSWORD webdav登录密码 +ALIYUNPAN_WEBDAV_MODE webdav模式,支持:rw-读写,ro-只读 ALIYUNPAN_PAN_DRIVE 网盘类型,可选: File-文件 Album-相册 ALIYUNPAN_PAN_DIR 网盘文件夹的webdav服务根目录 ``` diff --git a/docker/webdav/Dockerfile b/docker/webdav/Dockerfile index 1b81ec9..ba7a3e4 100644 --- a/docker/webdav/Dockerfile +++ b/docker/webdav/Dockerfile @@ -48,6 +48,7 @@ ENV ALIYUNPAN_DOCKER=1 ENV ALIYUNPAN_CONFIG_DIR=/home/app/config ENV ALIYUNPAN_AUTH_USER=admin ENV ALIYUNPAN_AUTH_PASSWORD=admin +ENV ALIYUNPAN_WEBDAV_MODE=rw ENV ALIYUNPAN_PAN_DRIVE=File ENV ALIYUNPAN_PAN_DIR=/ ENV ALIYUNPAN_REFRESH_TOKEN="" diff --git a/docker/webdav/app.sh b/docker/webdav/app.sh index 6c08424..eaaf36a 100755 --- a/docker/webdav/app.sh +++ b/docker/webdav/app.sh @@ -13,4 +13,4 @@ else fi ./aliyunpan config set -transfer_url_type ${ALIYUNPAN_TRANSFER_URL_TYPE} -./aliyunpan webdav start -ip "0.0.0.0" -port 23077 -webdav_user "${ALIYUNPAN_AUTH_USER}" -webdav_password "${ALIYUNPAN_AUTH_PASSWORD}" -pan_drive "${ALIYUNPAN_PAN_DRIVE}" -pan_dir_path "${ALIYUNPAN_PAN_DIR}" -bs ${ALIYUNPAN_BLOCK_SIZE} \ No newline at end of file +./aliyunpan webdav start -ip "0.0.0.0" -port 23077 -webdav_user "${ALIYUNPAN_AUTH_USER}" -webdav_password "${ALIYUNPAN_AUTH_PASSWORD}" -webdav_mode "${ALIYUNPAN_WEBDAV_MODE}" -pan_drive "${ALIYUNPAN_PAN_DRIVE}" -pan_dir_path "${ALIYUNPAN_PAN_DIR}" -bs ${ALIYUNPAN_BLOCK_SIZE} \ No newline at end of file diff --git a/docker/webdav/docker-compose.yml b/docker/webdav/docker-compose.yml index a4c5f3c..14e92be 100644 --- a/docker/webdav/docker-compose.yml +++ b/docker/webdav/docker-compose.yml @@ -15,6 +15,8 @@ services: - ALIYUNPAN_AUTH_USER=admin # webdav 登录密码 - ALIYUNPAN_AUTH_PASSWORD=admin + # webdav 网盘模式,支持:rw-读写,ro-只读 + - ALIYUNPAN_WEBDAV_MODE=rw # 指定网盘类型为文件,可选: File-文件 Album-相册 - ALIYUNPAN_PAN_DRIVE=File # 指定网盘文件夹作为webdav服务根目录