Files
icloud-sync/docker-compose.yml
2026-01-28 13:48:59 +08:00

53 lines
3.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
services:
icloudpd:
image: boredazfcuk/icloudpd:latest
container_name: icloudpd
restart: unless-stopped
environment:
# ===== 基础配置 =====
TZ: Asia/Shanghai # 时区
apple_id: ${APPLE_ID:-your@icloud.com} # Apple ID
authentication_type: 2FA # 认证类型2FA 或 Web
icloud_china: "true" # 使用中国区 iCloud (icloud.com.cn)
auth_china: "true" # 使用中国区认证
# ===== 下载配置 =====
download_path: /data # 下载路径
folder_structure: "{:%Y/%m}" # 文件夹结构:按年/月分类
synchronisation_interval: ${SYNC_INTERVAL:-86400} # 同步间隔21600(6h)/43200(12h)/86400(24h)
download_delay: 0 # 首次下载延迟(分钟)
skip_check: "true" # 跳过新文件检查(大库必须开启)
download_threads: 10 # 下载线程数
# ===== 文件类型 =====
photo_size: original # 照片尺寸original/medium/thumb/adjusted/alternative
live_photo_size: original # 实况照片尺寸
# skip_videos: "true" # 跳过视频
# skip_live_photos: "true" # 跳过实况照片
# ===== 下载范围 =====
# recent_only: 100 # 只下载最近 N 张
# until_found: 50 # 找到 N 张已存在的停止(增量同步)
# photo_album: "相册名" # 只下载指定相册
# ===== 删除选项 =====
# auto_delete: "true" # 自动删除 iCloud 已删除的照片
# delete_after_download: "true" # 下载后从 iCloud 删除
# delete_accompanying: "true" # 删除 HEIC 时删除对应 JPG
# delete_empty_directories: "true" # 删除空目录
# ===== 格式转换 =====
# convert_heic_to_jpeg: "true" # HEIC 转 JPEG
# jpeg_quality: 90 # JPEG 质量 (0-100)
# jpeg_path: /data/jpeg # JPEG 保存路径
# ===== 通知配置 =====
notification_days: 7 # Cookie 过期提前通知天数
# notification_type: Telegram # 通知类型Telegram/Pushover/Discord/Webhook 等
# telegram_token: "your_bot_token" # Telegram Bot Token
# telegram_chat_id: "your_chat_id" # Telegram Chat ID
volumes:
- ${PHOTOS_PATH:-./photos}:/data # 照片保存目录
- ./config:/config # 配置和 cookie 目录