---
version: '2'
services:
  hub:
    image: selenium/hub:3.8.1-erbium
    ports:
      - 4444:4444
  chrome:
    image: selenium/node-chrome:3.8.1-erbium
    # uncomment the two lines below to make tests watchable at vnc://localhost:secret@localhost:5900
    # image: selenium/node-chrome-debug
    # ports: ['5900:5900']
    links:
      - hub
    volumes:
      - /dev/shm:/dev/shm
    environment:
      HUB_PORT_4444_TCP_ADDR: hub
      HUB_PORT_4444_TCP_PORT: 4444
  firefox:
    image: selenium/node-firefox
    links:
      - hub
    environment:
      HUB_PORT_4444_TCP_ADDR: hub
      HUB_PORT_4444_TCP_PORT: 4444
  e2e:
    image: awx_e2e
    build:
      context: ../../../../../
      dockerfile: awx/ui/test/e2e/cluster/Dockerfile
    depends_on:
      - chrome
    links:
      - hub
    volumes:
      - ..:/awx/awx/ui/test/e2e
    environment:
      AWX_E2E_CLUSTER_HOST: hub
      AWX_E2E_CLUSTER_PORT: 4444
