version: "3.7"
services:
  farmer:
    image: registry.cn-hangzhou.aliyuncs.com/dahaige/farmer:gemini-3h-2024-feb-19
    volumes:
      #- /data01:/data01:rw
      #- /data02:/data02:rw
      #- /data03:/data03:rw
      #- /data04:/data04:rw
    networks:
      internal_network01:
        ipv4_address: 172.30.0.1
    container_name: farmer
    cpuset: "0-15"
    ports:
      - "30833:30533/udp"
      - "30833:30533/tcp"
    restart: unless-stopped
    command:
      [
        "farm",
        "--node-rpc-url", "ws://192.168.1.190:9944",
        "--listen-on", "/ip4/0.0.0.0/tcp/30833",
        #"--listen-on", "/ip6/::/tcp/30533",
        "--listen-on", "/ip4/0.0.0.0/udp/30833/quic-v1",
        #"--listen-on", "/ip6/::/udp/30533/quic-v1",
        "--in-connections", "300",
        "--out-connections", "100",
        "--pending-in-connections", "100",
        "--pending-out-connections", "100",
        "--allow-private-ips",
        "--sector-encoding-concurrency", "8",
        "--sector-downloading-concurrency", "8",
        #"--plotting-cpu-cores", "0,1,2,3,4,5 6,7,8,9,10,11",
        #"--replotting-cpu-cores", "0,2,4 6,8,10",
        "--farm-during-initial-plotting", "true",
        "--reward-address", "st7KNZCCRsWd2Hff4nzeg5FY2hXV3dwxWhzTqmxQNNEwhR6dP",
        #"path=/data01,size=6.95TiB",
        #"path=/data02,size=6.95TiB",
        #"path=/data03,size=6.95TiB",
        #"path=/data04,size=6.95TiB"
      ]

  qubic:
    container_name: qubic
    image: registry.cn-hangzhou.aliyuncs.com/dahaige/qubic:1.0
    networks:
      internal_network02:
        ipv4_address: 172.31.0.1
    restart: always
    volumes:
      - /root/qubic-docker:/qubic-docker
    command: bash /qubic-docker/run.sh
    cpuset: "16-31"      

networks:
  internal_network01:
    #enable_ipv6: true
    name: internal_network01
    driver_opts:
      "com.docker.network.bridge.name": "br-proxy"
      #"com.docker.network.bridge.enable_ip_masquerade": "false"
    ipam:
      config:
        - subnet: 172.30.0.0/24
          gateway: 172.30.0.254
        #- subnet: fd00:192:168:3::/64
        #  gateway: fd00:192:168:3::ffff  

  internal_network02:
    #enable_ipv6: true
    name: internal_network02
    driver_opts:
      "com.docker.network.bridge.name": "br-proxy02"
      #"com.docker.network.bridge.enable_ip_masquerade": "false"
    ipam:
      config:
        - subnet: 172.31.0.0/24
          gateway: 172.31.0.254
        #- subnet: fd00:192:168:3::/64
        #  gateway: fd00:192:168:3::ffff  
