version: '3'
services:
  node:
    build: .
    volumes:
      - ../:/repo:delegated
      - ../${DIST_SUB_PATH-.}/dist:/repo/dist:delegated
    working_dir: /repo
    command: npm run serve-test
    ports:
      - '9100:9001'
    expose:
      - '9001'
    depends_on:
      - firefox
      - chrome
  firefox:
    image: selenium/standalone-firefox-debug:3.141.59-oxygen
    environment:
      - VNC_NO_PASSWORD=1
    ports:
      - '4444'
      - '9059: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
    environment:
      - VNC_NO_PASSWORD=1
    ports:
      - '4444'
      - '9060:5900'
    volumes:
      # Mount shm also for firefox, see https://github.com/SeleniumHQ/docker-selenium#running-the-images
      - /dev/shm:/dev/shm
