gilesknap / gphotos-sync

Google Photos and Albums backup with Google Photos Library API
Apache License 2.0
1.97k stars 161 forks source link

Container Restarting #450

Closed gregeeh closed 6 months ago

gregeeh commented 8 months ago

Hi Everyone,

Just installed gphotos-sync in a Portainer Stack.

services:
    gphotos:
        container_name: gphotos
        environment:
            - PUID=1000
            - PGID=100
            - TZ=Australia/Sydney
        #ports:
           # - '9080:9080'
        volumes:
            - '/share/appdata/gphotos/config:/config'
            - '/share/appdata/gphotos/storage:/storage'
        hostname: gphotos.localdomain
        network_mode: bridge
        restart: unless-stopped
        image: ghcr.io/gilesknap/gphotos-sync

It seems to start OK but if I run any command in the container it restarts:

root@omv:~# docker exec -it gphotos ls
Error response from daemon: Container db5b64dc0ed003c79f7d21c73eab70413ee59e45ed58121490886d2317e4c977 is restarting, wait until the container is running
root@omv:~#
root@omv:~# docker exec -it gphotos gphotos-sync --skip-video --omit-album-date /storage
Error response from daemon: Container db5b64dc0ed003c79f7d21c73eab70413ee59e45ed58121490886d2317e4c977 is restarting, wait until the container is running
root@omv:~# 

Any ideas appreciated.

gilesknap commented 8 months ago

hi @gregeeh

I think because the entrypoint (from Dockerfile) is gphotos-sync it will be reporting missing arguments and exiting immediately.

If you want a permanent container that you can attach to and run gphotos-sync then you would want something like:-

docker run -dit --entrypoint bash  ghcr.io/gilesknap/gphotos-sync -c "while true; do sleep 1; done" 

(whatever the portainer equivalent to that is)

gregeeh commented 8 months ago

Thank you @gilesknap I will try your suggestions.

BTW - Thanks for your effort with this app. it will make life easier for us to be able to browse our Google Photos via a share on the NAS.

mist0706 commented 7 months ago

Is there any way to start this with docker-compose similar to what was done above?

gilesknap commented 7 months ago

Hi @mist0706 There is. But I can't recall the exact details.

You need to tell it about the mounts and you need to tell it that its an interactive terminal session I believe. I think I made this work sometime ago.

gilesknap commented 6 months ago

closing as a compose issue