Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Compose.yaml #969

Closed
BulldozerPete opened this issue Oct 17, 2024 · 6 comments
Closed

Docker Compose.yaml #969

BulldozerPete opened this issue Oct 17, 2024 · 6 comments

Comments

@BulldozerPete
Copy link

Summary

[NOTE]: Please provide a default Docker Compose.yaml

Context

[NOTE]: Managing and modifying containers with Docker Compose is much easier.

@AndreyNikiforov
Copy link
Collaborator

Are you looking for a guidance on how to convert your docker command (e.g. docker run icloudpd\icloudpd icloudpd --param1 --param2) into compose yaml?

Are you currently using compose? How many services your are running there? What specifics of compose are you expecting to be more valuable that using docker cli for icloudpd?

@BulldozerPete
Copy link
Author

BulldozerPete commented Oct 18, 2024

I don't know how to convert.
https://www.composerize.com gave this:

version: "3"
services:
    icloudpd:
        image: icloudpd
        command: --directory /data --username [email protected] --watch-with-interval
            3600

I am running 19 services via docker compose and like to store these "configs" in case of an data loss/ hw issue.

@BulldozerPete
Copy link
Author

BulldozerPete commented Oct 19, 2024

I can't get you app running.

I documentation is described to use this command:

docker run -it --rm --name icloudpd -v $(pwd)/Photos:/data -e TZ=America/Los_Angeles icloudpd/icloudpd:latest icloudpd --directory /data --username [email protected] --watch-with-interval 3600

I have composerized your command to this:

services:
    icloudpd:
        stdin_open: true
        tty: true
        container_name: icloudpd
        volumes:
            - $(pwd)/Photos:/data
        environment:
            - TZ=America/Los_Angeles
        image: icloudpd/icloudpd:latest
        command: icloudpd --directory /data --username [email protected]
            --watch-with-interval 3600

Is there an option to enter the iCloud pw into the compose?

@BulldozerPete
Copy link
Author

When running the docker run command from above this happens:

iCloud Password: 
2024-10-19 20:04:03 ERROR    Service Temporarily Unavailable (503)
Traceback (most recent call last):
  File "pyicloud_ipd/base.py", line 211, in authenticate
  File "requests/sessions.py", line 637, in post
  File "pyicloud_ipd/session.py", line 122, in request
  File "pyicloud_ipd/session.py", line 196, in _raise_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Service Temporarily Unavailable (503)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "starters/icloudpd_ex.py", line 122, in <module>
  File "starters/icloudpd_ex.py", line 118, in main
  File "click/core.py", line 1157, in __call__
  File "click/core.py", line 1078, in main
  File "click/core.py", line 1688, in invoke
  File "click/core.py", line 1434, in invoke
  File "click/core.py", line 783, in invoke
  File "icloudpd/base.py", line 745, in main
  File "icloudpd/base.py", line 1179, in core
  File "icloudpd/authentication.py", line 53, in authenticate_
  File "pyicloud_ipd/base.py", line 157, in __init__
  File "pyicloud_ipd/base.py", line 219, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('Service Temporarily Unavailable (503)'))
[7] Failed to execute script 'icloudpd_ex' due to unhandled exception!

@AndreyNikiforov
Copy link
Collaborator

I can't get you app running.

I documentation is described to use this command:

docker run -it --rm --name icloudpd -v $(pwd)/Photos:/data -e TZ=America/Los_Angeles icloudpd/icloudpd:latest icloudpd --directory /data --username [email protected] --watch-with-interval 3600

I have composerized your command to this:

services:
    icloudpd:
        stdin_open: true
        tty: true
        container_name: icloudpd
        volumes:
            - $(pwd)/Photos:/data
        environment:
            - TZ=America/Los_Angeles
        image: icloudpd/icloudpd:latest
        command: icloudpd --directory /data --username [email protected]
            --watch-with-interval 3600

Is there an option to enter the iCloud pw into the compose?

You can use --password parameter to icloudpd, but it will not be very secure.

I am not aware of tty & stdin_open options. Without them, compose expects services, in other words headless apps with no stdin/tty input. icloudpd can run in such mode with webui

I also don't know how $(pwd) works in compose. In regular docker run it is passed from the shell that starts the command. Most likely you will need to provide full path in compose file.

@AndreyNikiforov
Copy link
Collaborator

When running the docker run command from above this happens:

iCloud Password: 
2024-10-19 20:04:03 ERROR    Service Temporarily Unavailable (503)
Traceback (most recent call last):
  File "pyicloud_ipd/base.py", line 211, in authenticate
  File "requests/sessions.py", line 637, in post
  File "pyicloud_ipd/session.py", line 122, in request
  File "pyicloud_ipd/session.py", line 196, in _raise_error
pyicloud_ipd.exceptions.PyiCloudAPIResponseException: Service Temporarily Unavailable (503)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "starters/icloudpd_ex.py", line 122, in <module>
  File "starters/icloudpd_ex.py", line 118, in main
  File "click/core.py", line 1157, in __call__
  File "click/core.py", line 1078, in main
  File "click/core.py", line 1688, in invoke
  File "click/core.py", line 1434, in invoke
  File "click/core.py", line 783, in invoke
  File "icloudpd/base.py", line 745, in main
  File "icloudpd/base.py", line 1179, in core
  File "icloudpd/authentication.py", line 53, in authenticate_
  File "pyicloud_ipd/base.py", line 157, in __init__
  File "pyicloud_ipd/base.py", line 219, in authenticate
pyicloud_ipd.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('Service Temporarily Unavailable (503)'))
[7] Failed to execute script 'icloudpd_ex' due to unhandled exception!

#970

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants