mandarons / icloud-docker

Dockerized iCloud Client - make a local copy of your iCloud documents and photos, and keep it automatically up-to-date.
BSD 3-Clause "New" or "Revised" License
1.15k stars 49 forks source link

Container not reading config.yml #242

Closed unofficialmatt closed 3 months ago

unofficialmatt commented 3 months ago

I'm setting up this container for the first time with the latest release.

My logs are filled with this message:

2024-07-13 09:05:20,012 :: WARNING :: root :: config_parser.py :: 119 :: Warning: root destination is missing in app > root. Using default root destination: ./icloud 2024-07-13 09:05:20,015 :: ERROR :: root :: config_parser.py :: 46 :: username is missing in app > credentials > username. Please set the username.

I've followed the docs and can't see what I'm doing wrong. I can manually auth with docker exec -it icloud /bin/sh -c "icloud --username=<icloud-username> --session-directory=/config/session_data"

Docker Compose:

services:
   # Automatic download of iCloud Drive files
   icloud:
      image: mandarons/icloud-drive
      container_name: icloud
      restart: always
      environment:
         PUID: $PUID
         PGID: $PGID
      env_file:
         - ../.env # Must contain ENV_ICLOUD_PASSWORD=<password> and ENV_CONFIG_FILE_PATH=/config/config.yaml
      volumes:
         - /etc/timezone:/etc/timezone:ro
         - /etc/localtime:/etc/localtime:ro
         - /mnt/USB1/Backups/iCloud:/icloud
         - ${DOCKERDIR}/appdata/icloud-drive/config:/config # Must contain config.yaml

.env

ENV_ICLOUD_PASSWORD=MYPASSWORD
ENV_CONFIG_FILE_PATH="/config/config.yaml"

config/config.yml


app:
   logger:
      # level - debug, info (default), warning or error
      level: "info"
      # log filename icloud.log (default)
      filename: "/config/icloud.log"
   credentials:
      # iCloud drive username
      username: "MYEMAIL"
      # Retry login interval - default is 10 minutes, specifying -1 will retry login only once and exit
      retry_login_interval: 600
   # Drive destination
   root: "/icloud"
   #   discord:
   # webhook_url: <your server webhook URL here>
   # username: icloud-docker #or any other name you prefer
   #   telegram:
   # bot_token: <your Telegram bot token>
   # chat_id: <your Telegram user or chat ID>
   #   smtp:
   ## If you want to receive email notifications about expired/missing 2FA credentials then uncomment
   # email: "user@test.com"
   ## optional, to email address. Default is sender email.
   # to: "receiver@test.com"
   # password:
   # host: "smtp.test.com"
   # port: 587
   # If your email provider doesn't handle TLS
   # no_tls: true
   region: global # For China server users, set this to - china (default: global)
drive:
   destination: "drive"
   remove_obsolete: true
   sync_interval: 300
   #   filters: # Optional - use it only if you want to download specific folders.
   #     # File filters to be included in syncing iCloud drive content
   #     folders:
   #       - "folder1"
   #       - "folder2"
   #       - "folder3"
   #     file_extensions:
   #       # File extensions to be included
   #       - "pdf"
   #       - "png"
   #       - "jpg"
   #       - "jpeg"
   ignore:
      # When specifying folder paths, append it with /*
      - "node_modules/*"
      #  - "*.md"
photos:
   destination: "photos"
   remove_obsolete: true
   sync_interval: 500
   all_albums: false # Optional, default false. If true preserve album structure. If same photo is in multiple albums creates duplicates on filesystem
   folder_format: "%Y/%m" # optional, if set put photos in subfolders according to format. Format cheatsheet - https://strftime.org
   filters:
      # List of libraries to download. If omitted (default), photos from all libraries (own and shared) are downloaded. If included, photos only
      # from the listed libraries are downloaded.
      # libraries:
      #   - PrimarySync # Name of the own library

      # if all_albums is false - albums list is used as filter-in, if all_albums is true - albums list is used as filter-out
      # if albums list is empty and all_albums is false download all photos to "all" folder. if empty and all_albums is true download all folders
      #  albums:
      #    - "album 1"
      #    - "album2"
      file_sizes: # valid values are original, medium and/or thumb
         - "original"
         - "medium"
         - "thumb"
      #  extensions:# Optional, media extensions to be included in syncing iCloud Photos content
      # - jpg
      # - heic
      # - png

Help would be appreciated - this looks like a great solution for redundancy of iCloud

unofficialmatt commented 3 months ago

OK i see what the problem was - rookie mistake - I had named my congif .yml not .yaml!