version: '3'
services:
  node:
    image: node
    volumes:
      - ../:/repo:delegated
    working_dir: /repo
    command: yarn serve
    ports:
      - '9001'
    expose:
      - '9001'
  firefox:
    image: selenium/standalone-firefox-debug:3.141.59-oxygen
    depends_on:
      - node
    environment:
      - VNC_NO_PASSWORD=1
    ports:
      - '4444'
      - '5900'
    volumes:
      # Mount shm also for firefox, see https://github.com/SeleniumHQ/docker-selenium#running-the-images
      - /dev/shm:/dev/shm
  chrome:
    image: selenium/standalone-chrome-debug:3.141.59-oxygen
    depends_on:
      - node
    environment:
      - VNC_NO_PASSWORD=1
    ports:
      - '4444'
      - '5900'
    volumes:
      # Mount shm also for firefox, see https://github.com/SeleniumHQ/docker-selenium#running-the-images
      - /dev/shm:/dev/shm

  codeceptjs:
    depends_on:
      - node
    image: codeception/codeceptjs
    working_dir: /repo/tests/codeceptjs
    volumes:
      - ../:/repo:delegated
