version: '3'

networks:
  rustdesk-net:
    external: false

services:
  hbbs:
    container_name: hbbs
    ports:
      - "21115:21115"       # NAT类型测试端口
      - "21116:21116"       # TCP打洞与连接服务端口
      - "21116:21116/udp"   # ID注册与心跳服务端口
      - "21118:21118"       # 网页客户端支持端口
    image: rustdesk/rustdesk-server:latest
    command: hbbs -r 119.45.9.110:21117
    volumes:
      - ./data:/root
    networks:
      - rustdesk-net
    depends_on:
      - hbbr
    restart: unless-stopped

  hbbr:
    container_name: hbbr
    ports:
      - "21117:21117"       # 中继服务端口
      - "21119:21119"       # 网页客户端支持端口
    image: rustdesk/rustdesk-server:latest
    command: hbbr
    volumes:
      - ./data:/root
    networks:
      - rustdesk-net
    restart: unless-stopped
