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.19k stars 49 forks source link

[BUG] Argh ... what did I do wrong!? #257

Closed robdejonge closed 2 months ago

robdejonge commented 2 months ago

Describe the bug I've been using this tool for several years without any problem, and recently it has stopped working. For the life of me, I can't figure out what I am doing wrong.

To Reproduce I normally start the container once daily to do a sync, and it then waits in the 'stopped' state until it gets started again. This has always worked really well, but for some reason I can't get it working again.

  1. Empty the $config/session_data folder
  2. Stop and remove the container, remove the images to ensure the latest get downloaded
  3. I change sync_interval to 300 so that I have time to get the password stored
  4. I bring the container up (docker compose up)
  5. Observations:
  1. After this, I can add the password and this does indeed update the /config/session_data files.
  2. If I then stop the container and then start it again, the output shows "usermod: no changes" and then the usual messages which seem to still be coming from the /app/config.yaml file.

Expected behavior I expect it to follow directions provided in /config/config.yaml rather than /app/config.yaml.

Configuration My docker-compose.yaml:

services:
  icloud-drive:
    image: mandarons/icloud-drive:main
    environment:
      - PUID=1000
      - GUID=1000
    container_name: icloud-drive
    restart: "no"
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - /opt/icloud-drive-config:/config
      - /srv/icloud-drive-files:/icloud/drive

My config.yaml:

app:
  logger: 
    level: "info"
    filename: "/config/sync.log"
  credentials:
    username: myusername@icloud.com
    retry_login_interval: -1
  verbose: true
  root: "/icloud"
drive:
  destination: "drive"
  sync_interval: -1
  remove_obsolete: true

There is no message on the container output clarifying which config file is being used, but I'm fairly certain the /app/config.yaml is being used. Why this happens, I do not know. Maybe my config file is being dismissed because of an error?

Additional context I've tried changing permissions to 777 for /opt/icloud-drive-files and files within, to avoid permissions being an issue.

(I'm aware this is more likely a configuration error on my part, but I've had several runs at this and have no idea what I'm doing wrong ... and about to give up on using this!)

mandarons commented 2 months ago

Please update your environment variables list in docker-compose.yaml to set ENV_CONFIG_FILE_PATH=/config/config.yaml and PGID=1000 (not GUID).

robdejonge commented 2 months ago

Sorry for the bug label, when I clicked 'New issue' I did not see the ability for a support request.

I feel a bit silly, as it's clearly in the documentation right there. But this must have been a recent change to the requirements, as previously it was all just working? Anyway, it's all working again just fine now.

Thanks for your help!

mandarons commented 2 months ago

No worries. Yes, it is a recent change mentioned in v1.20.0 breaking changes