services:
  syncthing:
    image: linuxserver/syncthing
    container_name: syncthing
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    volumes:
      - /home/orangepi/syncthing/config/:/config
      - type: volume
        source: synology_homes
        target: /sync/homes
        volume:
          nocopy: true
    ports:
      - 8384:8384
      - 22000:22000
      - 22000:22000/udp
      - 21027:21027/udp
    restart: unless-stopped
  minio:
    image: minio/minio
    container_name: minio
    volumes:
      - minio_config:/root/.minio
      - type: volume
        source: synology_s3
        target: /data
        volume:
          nocopy: true
    ports:
      - 9000:9000  # API
      - 9001:9001  # Console
    environment:
      - MINIO_ROOT_USER=minioadmin
      - MINIO_ROOT_PASSWORD=test_pw_one
      - MINIO_BROWSER_REDIRECT_URL=http://192.168.2.106:9001
    command: server --console-address ":9001" /data
    restart: always
volumes:
  minio_config:
  synology_s3:
    driver: local
    driver_opts:
      type: nfs
      o: addr=192.168.2.132,rw,nfsvers=3
      device: ":/volume1/bucket"
  synology_homes:
    driver: local
    driver_opts:
      type: nfs
      o: addr=192.168.2.132,rw,nfsvers=3,nolock
      device: ":/volume1/homes"
