version: "3"
services:
  chrome:
    image: selenium/standalone-chrome:106.0
    shm_size: 2gb
    ports:
      - 4444:4444
    environment:
      - SE_NODE_SESSION_TIMEOUT=10

  firefox:
    image: selenium/standalone-firefox:105.0
    shm_size: 2gb
    ports:
      - 4445:4444
    environment:
      - SE_NODE_SESSION_TIMEOUT=10

  chrome_video:
    image: selenium/video
    environment:
      - DISPLAY_CONTAINER_NAME=chrome
      - FILE_NAME=chrome_video.mp4
    volumes:
      - /tmp/selenium/videos:/videos

  firefox_video:
    image: selenium/video
    environment:
      - DISPLAY_CONTAINER_NAME=firefox
      - FILE_NAME=firefox_video.mp4
    volumes:
      - /tmp/selenium/videos:/videos
