version: '3'
services:
  rclone:
    build: # Instruction pour build l'image
      context: ./build
      dockerfile: Dockerfile
    #image: richardregeer/google-drive-sync
    container_name: google-drive-sync
    restart: always
    #logging:
    #  driver: "json-file"
    #  options:
    #      max-size: "50m"
    volumes:      
      - "./.config/google-sync/config.json:/usr/local/bin/google-sync/etc/config.json"
      - "/mnt/data:/var/target:ro"
      - "./.config/rclone/rclone.conf:/root/.config/rclone/rclone.conf"
      - "./logs:/logs"
      - /etc/passwd:/etc/passwd:ro
      - /etc/group:/etc/group:ro
    cap_add:
      - SYS_ADMIN
      - SETPCAP
      - MKNOD

    #command: "tail -f /dev/null"
    #mount media: /data/media --buffer-size 256M --dir-cache-time 1000h --log-level DEBUG --poll-interval 15s --timeout 1h --rc --rc-web-gui --rc-addr :5572 --rc-user=plex --rc-pass=plexmedia --log-file /config/rclone/logs/rcloneUnion04072020d.log
    #ports:
    #  - 5572:5572
    #security_opt:
    #  - seccomp:unconfined
    #environment:
    #  - PHP_TZ=Europe/Paris
    #  - PUID=1000
    #  - PGID=1000