version: "3"
services:
  oj-rsync-master:
    image: oj_rsync
    container_name: oj-rsync
    volumes:
      - $PWD/data/backend/test_case:/test_case:ro
      - $PWD/data/rsync_master:/log
    environment:
      - RSYNC_MODE=master
      - RSYNC_USER=ojrsync
      - RSYNC_PASSWORD=CHANGE_THIS_PASSWORD
    ports:
      - "0.0.0.0:873:873"
    
  oj-rsync-slave:
    image: oj-rsync
    volumes:
      - $PWD/test_case:/test_case
      - $PWD/rsync_slave:/log
    environment:
      - RSYNC_MODE=slave
      - RSYNC_USER=ojrsync
      - RSYNC_PASSWORD=CHANGE_THIS_PASSWORD
