version: '2'
services:
  client:
    build:
      context: .
      dockerfile: ./Dockerfile.dev
    volumes:
      - ./misc:/root/tahoe-lafs/misc
      - ./integration:/root/tahoe-lafs/integration
      - ./src:/root/tahoe-lafs/static
      - ./setup.cfg:/root/tahoe-lafs/setup.cfg
      - ./setup.py:/root/tahoe-lafs/setup.py
    ports:
      - "127.0.0.1:3456:3456"
    depends_on:
      - "introducer"
      - "server"
    entrypoint: /root/tahoe-lafs/venv/bin/tahoe
    command: ["run", "/root/.tahoe-client"]
  server:
    build:
      context: .
      dockerfile: ./Dockerfile.dev
    volumes:
      - ./misc:/root/tahoe-lafs/misc
      - ./integration:/root/tahoe-lafs/integration
      - ./src:/root/tahoe-lafs/static
      - ./setup.cfg:/root/tahoe-lafs/setup.cfg
      - ./setup.py:/root/tahoe-lafs/setup.py
    ports:
      - "127.0.0.1:3457:3457" 
    depends_on: 
      - "introducer"
    entrypoint: /root/tahoe-lafs/venv/bin/tahoe
    command: ["run", "/root/.tahoe-server"]
  introducer:
    build:
      context: .
      dockerfile: ./Dockerfile.dev
    volumes:
      - ./misc:/root/tahoe-lafs/misc
      - ./integration:/root/tahoe-lafs/integration
      - ./src:/root/tahoe-lafs/static
      - ./setup.cfg:/root/tahoe-lafs/setup.cfg
      - ./setup.py:/root/tahoe-lafs/setup.py
    ports:
      - "127.0.0.1:3458:3458" 
    entrypoint: /root/tahoe-lafs/venv/bin/tahoe
    command: ["run", "/root/.tahoe-introducer"]
