services:
  rethinkdb:
    image: rethinkdb:2.4
    ports:
      - "8080:8080"
      - "28015:28015"
      - "29015:29015"
    volumes:
      - rethinkdb_data:/data

  stf:
    image: openstf/stf:latest
    ports:
      - "7100:7100"
      - "7101:7101"
      - "7102:7102"
      - "7103:7103"
      - "7104:7104"
      - "7105:7105"
    environment:
      - STF_ADMIN_EMAIL=admin@example.com
      - STF_ADMIN_NAME=Admin
    depends_on:
      - rethinkdb
    command: stf local --public-ip $(hostname -I | awk '{print $1}') --adb-host $(hostname -I | awk '{print $1}')
    volumes:
      - /dev/bus/usb:/dev/bus/usb
    privileged: true

volumes:
  rethinkdb_data:
