[新服务]Docker+Cloudreve+Aliyun阿里云盘(Webdav)形式

date
Oct 31, 2021
slug
cloudreve-aliyun-webdav-docker
status
Published
summary
新服务
tags
service
type
Post
notion image

Summary

步骤

假设已经把webdav做好了

然后做到开启加载WebDav

开启Cloudreve

# assume webdav is already mounted here /drive/aliyun1314
PATH_UPLOADS=/drive/aliyun1314/cloudreve
mkdir -p $PATH_UPLOADS

mkdir -p /data/cloudreve && cd /data/cloudreve
mkdir config && cat > ./config/conf.ini <<EOF
# conf.ini
[Database]
DBFile = /cloudreve/db/cloudreve.db
EOF

# main command
docker run -d \
  --name cloudreve \
  -e PUID=$UID \
  -e PGID=$GID \
  -e TZ="Asia/Shanghai" \
  -p 3333:5212 \
  --restart=unless-stopped \
  -v $PATH_UPLOADS:/cloudreve/uploads \
  -v $(pwd)/config:/cloudreve/config \
  -v $(pwd)/db:/cloudreve/db \
  -v $(pwd)/avatar:/cloudreve/avatar \
  xavierniu/cloudreve

docker logs -f cloudreve

# 然后用 http://ip:3333 来访问即可
# 首次启动后请执行docker logs -f cloudreve获取初始密码
# PUID以及PGID的获取方式详见获取PUIDPGID
# TZ设置时区,默认值为Asia/Shanghai

# 如果更新
docker rm -f cloudreve \
&& docker pull xavierniu/cloudreve
# run the main command again
notion image
 

验证

notion image
 

© Ying Bun 2021 - 2024