add device id config for docker

This commit is contained in:
tickstep 2023-02-19 17:04:45 +08:00
parent 571baa1482
commit 4ba61c19c8
6 changed files with 24 additions and 1 deletions

View File

@ -62,6 +62,7 @@ ENV ALIYUNPAN_SYNC_PRIORITY=time
ENV ALIYUNPAN_SYNC_LOG=false
ENV ALIYUNPAN_LOCAL_DELAY_TIME=3
ENV ALIYUNPAN_TASK_STEP=sync
ENV ALIYUNPAN_DEVICE_ID=""
# 运行
ENTRYPOINT ./app.sh

View File

@ -29,6 +29,15 @@ fi
sleep 2s
# device-id
if [[ -z $ALIYUNPAN_DEVICE_ID ]];
then
echo "the program use random device id"
else
echo "set device id"
./aliyunpan config set -device_id ${ALIYUNPAN_DEVICE_ID}
fi
# check login already or not
./aliyunpan who
if [ $? -eq 0 ]

View File

@ -37,3 +37,5 @@ services:
- ALIYUNPAN_LOCAL_DELAY_TIME=3
# 任务步骤, 支持两种: scan(只扫描并建立同步数据库),sync(正常启动同步任务)
- ALIYUNPAN_TASK_STEP=sync
# 登录设备的ID默认为空程序会自动生成一个ID
- ALIYUNPAN_DEVICE_ID=

View File

@ -54,5 +54,6 @@ ENV ALIYUNPAN_PAN_DIR=/
ENV ALIYUNPAN_REFRESH_TOKEN=""
ENV ALIYUNPAN_TRANSFER_URL_TYPE=0
ENV ALIYUNPAN_BLOCK_SIZE=10240
ENV ALIYUNPAN_DEVICE_ID=""
ENTRYPOINT ./app.sh

View File

@ -2,6 +2,15 @@
cd /home/app
chmod +x ./aliyunpan
# device-id
if [[ -z $ALIYUNPAN_DEVICE_ID ]];
then
echo "the program use random device id"
else
echo "set device id"
./aliyunpan config set -device_id ${ALIYUNPAN_DEVICE_ID}
fi
# check login already or not
./aliyunpan who
if [ $? -eq 0 ]

View File

@ -25,7 +25,8 @@ services:
- ALIYUNPAN_TRANSFER_URL_TYPE=1
# 上传数据块大小单位为KB默认为10240KB建议范围1024KB~10240KB
- ALIYUNPAN_BLOCK_SIZE=10240
# 登录设备的ID默认为空程序会自动生成一个ID
- ALIYUNPAN_DEVICE_ID=