Docker compose configs sanity check

Hi all,

I have been fighting with setting up google-drive rclone via docker for the past couple of days and I finally got it to work but i would appreciate a 2nd pair of eyes in case i am doing something blatantly stupid. Here is my docker-compose, any tips welcome.

    image: rclone/rclone:latest
    container_name: rclone
    restart: unless-stopped
      - $DOCKERDIR/appdata/rclone/config:/config/rclone
      - $USERDIR/rclone/data:/data:shared
      - /etc/passwd:/etc/passwd:ro
      - /etc/group:/etc/group:ro
    user: "${PUID}:${PGID}"
    privileged: true
      - SYS_ADMIN
      - SETPCAP
      - MKNOD
      - /dev/fuse:/dev/fuse
      - apparmor:unconfined
    command: "mount gdrive-sync:rsync /data \
    --max-read-ahead=256M \
    --buffer-size=128M \
    --vfs-read-chunk-size=128M \
    --vfs-read-chunk-size-limit=2048M \
    --allow-non-empty \
    --allow-other \
    --multi-thread-chunk-size=500Mi \
    --drive-chunk-size=1024M \
    --tpslimit=10 \
    --tpslimit-burst=20 \
    --transfers=50 \
    --checkers=8 \
    --cache-db-purge \
    --poll-interval 10m \
    --buffer-size 1249M \
    --log-level INFO"

Not sure where you have these flags from...

--checkers has no effect on the VFS
--cache-db-purge is for remote you are not using and it is deprecated
--transfers=50 is for sure far too high
you have --buffer-size=128M and --buffer-size 1249M

rest I suspect are random too... without any deeper logic:)

My advice is to use default values unless you have very specific requirements.

Maybe only --tpslimit makes sense to prevent throttling

All together:

command: "mount gdrive-sync:rsync /data \
    --allow-non-empty \
    --allow-other \
    --tpslimit=10 \
    --tpslimit-burst=10 \
    --log-level INFO"

Also --allow-non-empty is not needed if you mount to empty folder - and this is what you should do.

Thanks for the feedback. I was running into issues during setup, and I was just looking up online random solutions and trying things out.

I cut down the command to the bare minimum, like you mentioned.

The only thing, if I don't use --allow-non-empty, I will get an error if I try to rebuild the container saying can not mount to directory.

Ok maybe it is needed then with docker.. I am not 100% sure myself.

With the rest - I use default values myself for most of my projects. Unless I have to fix specific issues I do not use any custom flags beyond basics for mount - cache mode/size/logging - that's it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.