๐Ÿ“ฆ SeleniumHQ / docker-selenium

๐Ÿ“„ docker-compose-v3-video-upload-dynamic-grid.yml ยท 61 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61# To execute this docker compose yml file use `docker compose -f docker-compose-v3-video-upload-dynamic-grid.yml up`
# Add the `-d` flag at the end for detached execution
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-video-upload-dynamic-grid.yml down`
services:
  # Start a local FTP server to demonstrate video upload with RCLONE (https://github.com/delfer/docker-alpine-ftp-server)
  ftp_server:
    image: delfer/alpine-ftp-server:latest
    container_name: ftp_server
    environment:
      - USERS=seluser|selenium.dev
    volumes:
      # Mount the local directory `/tmp/upload` to the FTP server's `/ftp/seluser` directory to check out the uploaded videos
      - /tmp/upload:/ftp/seluser
    command: ["/bin/sh", "-c", "/sbin/tini -- /bin/start_vsftpd.sh && tail -f /dev/null"]
    stop_grace_period: 30s

  # File browser to manage the uploaded videos from the FTP server
  file_browser:
    image: filebrowser/filebrowser:latest
    container_name: file_browser
    restart: always
    ports:
      - "8081:80"
    volumes:
      # Mount the local directory `/tmp/upload` to file browser's `/srv` directory to check out the uploaded videos
      - /tmp/upload:/srv
    environment:
      - FB_NOAUTH=true

  node-docker:
    image: selenium/node-docker:4.40.0-20260120
    volumes:
      - ./assets:/opt/selenium/assets
      - ./NodeDocker/config.toml:/opt/selenium/docker.toml
      - /var/run/docker.sock:/var/run/docker.sock
    depends_on:
      - selenium-hub
    environment:
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_VIDEO_RECORD_STANDALONE=true
      - SE_VIDEO_FILE_NAME=auto
      - SE_VIDEO_FILE_NAME_SUFFIX=true
      - SE_VIDEO_UPLOAD_ENABLED=true
      - SE_UPLOAD_DESTINATION_PREFIX=myftp://ftp/seluser
      # All configs required for RCLONE to upload to remote name myftp with prefix SE_
      - SE_RCLONE_CONFIG_MYFTP_TYPE=ftp
      - SE_RCLONE_CONFIG_MYFTP_HOST=ftp_server
      - SE_RCLONE_CONFIG_MYFTP_PORT=21
      - SE_RCLONE_CONFIG_MYFTP_USER=seluser
      # Password encrypted using command: rclone obscure <your_password>
      - SE_RCLONE_CONFIG_MYFTP_PASS=KkK8RsUIba-MMTBUSnuYIdAKvcnFyLl2pdhQig
      - SE_RCLONE_CONFIG_MYFTP_FTP_CONCURRENCY=10

  selenium-hub:
    image: selenium/hub:4.40.0-20260120
    container_name: selenium-hub
    ports:
      - "4442:4442"
      - "4443:4443"
      - "4444:4444"