otherguy/docker-dropbox

Can't set POLLING_INTERVAL using docker-compose

Closed this issue · 2 comments

if [[ ! "${POLLING_INTERVAL}" =~ ^[0-9]+$ ]]; then

Docker version 20.10.7, build f0df350
docker-compose version 1.29.2, build 5becea4c
Dropbox version 127.4.4265 (in container)

I think there's something off with this line when used with docker-compose at least...

This is my docker-compose.yml:

    # https://github.com/otherguy/docker-dropbox
    dropbox:
        container_name: dropbox
        image: otherguy/dropbox:latest
        restart: unless-stopped
        # Host network mode for LAN sync
        network_mode: host
        # Skip permissions speeds up startup and is not needed as we pass UID/GID
        environment:
            - DROPBOX_UID=${UID}
            - DROPBOX_GID=${GUID}
            - POLLING_INTERVAL=20
            - SKIP_SET_PERMISSIONS=true
        volumes:
            - /etc/localtime:/etc/localtime:ro
            - /etc/timezone:/etc/timezone:ro  
            - ${DROPBOX_CONFIG}:/opt/dropbox/.dropbox:rw
            - ${DROPBOX_FOLDER}:/opt/dropbox/Dropbox:rw   

I have tried all of:

  • Using using a variable defined in my '.env (${DROPBOX_POLLING_INTERVAL})
  • The literal 20 as above
  • The literal in string form "20"

... in my docker-compose.yml and in every case I get this in my logs:

POLLING_INTERVAL not set to a valid number, defaulting to 5!

I'd really like to set this to a higher value as it causes a little CPU spike every 5 seconds otherwise, which is overkill for my dropbox needs.

Thanks for any help!

(host is a very vanilla Ubuntu 20.04)

Please ignore this, I didn't realise with compose I had to up the container when changing env vars...apologies for the noise.