Closed loicpavard closed 3 weeks ago
Hey, Just updatig here gor anyone interested. been able to solve this by reploying the stack after isolating environment variables in a stack.env file instead of declaring the environment variables indvidually from the web editor in Portainer. Though I do not understand why it makes a difference, it seems it does !
So I now have 2 containers running at the same time, for 2 x apple IDs, monitored by the same Telegram bot chat, but I am able to trigger remote sync and reauthentication process individually for each iCloud user.
Running exactly as expected !
Closing the ticket, then.
Docker variables are only used to write to the /conf/icloudpd.conf file. Whatever is set in that file is what gets loaded into the environment. This way, you can change the variables in the config file to change what's happening inside the container. It will re-load the config file before each sync run. It allows you to change settings without having to remove/recreate the container every time.
Great. Thanks for the confirmation. That was the behaviour I understood but wasn't sure.
Describe the bug Hello @boredazfcuk, Fantastic work as a start ! This icloudpd revamped with the impovement you brought is amazing. I have discovered it recently, made a few trials and got running pretty smoothly on a Synology DS720+.
Using Portainer and decided to create 2 x stacks generating each one container for myself and my wife (2 apple IDs) I got everything running exactly as expected except a little detail: When doing trials, I realized that from time to time, the created container was defaulting to user value instead of taking user="myusername" value from my Portainer stack.
I thought I found the reason for this (I had initially one unique stack with the 2 x configurations to create 2 containers sharing the Telegram chat ID and API) Reason why I decided to create 2 x differents stacks in Portainer and that seemed to solve the issue.
But I just launched today the full sync of our iCloud Libraries by deploying 1 x stack (= 1 x container created) per Apple ID (one for myself, the other for my wife) and now I can see in the logs that both containers report that they are monitoring Telegram fro remote commands prefix: user.
2024-10-31 13:30:55 INFO Synchronisation complete for user 2024-10-31 13:30:55 INFO Monitoring Telegram for remote commands prefix: user
I still share one unique Telegram Chat ID and API for both containers but the user declared (from my Synology) in each container is different.
Expected behaviour I was expecting (and manage to get this working fine during my trials) that syncing process, reauthentication etc... to be to triggered independently with each user.
Actual behaviour Right now, both containers seem to have default to the default value "user", so I cannot control each container independently (if I enter "user" in the chatbot, it will trigger sync for both containers, or sometimes trigger for the 1st one and not the second one)
System (The following information must be entered or the issue will be closed):
services: icloudpd-XXX: image: boredazfcuk/icloudpd:latest container_name: icloudpd-XXX restart: unless-stopped environment:
I think I understand the user value is set at the initialisation process of the container and thus Telegram is eventually relying on the value set at this step. But I am not 100% sure about this. Any idea why I am facing this behaviour ?
Many thanks for your opinion !
Cheers