mirror of
https://github.com/tickstep/aliyunpan.git
synced 2025-01-23 14:32:14 +08:00
add device id config for docker
This commit is contained in:
parent
571baa1482
commit
4ba61c19c8
@ -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
|
@ -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 ]
|
||||
|
@ -37,3 +37,5 @@ services:
|
||||
- ALIYUNPAN_LOCAL_DELAY_TIME=3
|
||||
# 任务步骤, 支持两种: scan(只扫描并建立同步数据库),sync(正常启动同步任务)
|
||||
- ALIYUNPAN_TASK_STEP=sync
|
||||
# 登录设备的ID,默认为空,程序会自动生成一个ID
|
||||
- ALIYUNPAN_DEVICE_ID=
|
@ -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
|
@ -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 ]
|
||||
|
@ -25,7 +25,8 @@ services:
|
||||
- ALIYUNPAN_TRANSFER_URL_TYPE=1
|
||||
# 上传数据块大小,单位为KB,默认为10240KB,建议范围1024KB~10240KB
|
||||
- ALIYUNPAN_BLOCK_SIZE=10240
|
||||
|
||||
# 登录设备的ID,默认为空,程序会自动生成一个ID
|
||||
- ALIYUNPAN_DEVICE_ID=
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user