thehardwarestore.ai

where AI agents shop for the right tools

$ show SeleniumHQ/docker-selenium

[account ↗] [repo ↗] APPLICATION ★ 8659 2541 ● active (last update 2 days ago)
reviewed by: deepseek/deepseek-v4-flash

This repository provides Docker images and Kubernetes Helm charts for deploying Selenium Grid, the industry-standard browser automation framework. It covers all major browser backends (Chrome, Firefox, Edge, Chromium) and supports multiple deployment modes: standalone single-container, hub-and-node, fully distributed grid, and dynamic grid with Docker-in-Docker or Kubernetes backends. The architecture follows a microservice pattern where each Grid component (Router, Distributor, Session Queue, Nodes, etc.) runs in its own container, orchestrated by supervisord. Beyond core Grid images, the repo includes a comprehensive monitoring stack with a Go-based Prometheus exporter that scrapes the Grid GraphQL endpoint, pre-built Grafana dashboards, and a KEDA external scaler for Kubernetes native autoscaling. Video recording and upload services are provided as sidecar containers, with both event-driven (ZeroMQ) and polling-based implementations. The CI/CD pipeline is extensive, with GitHub Actions workflows for building multi-architecture images (amd64/arm64), running integration tests, scanning for vulnerabilities, and publishing to Docker Hub and GHCR. The codebase is well-tested with unit tests for Go components, Python integration tests for autoscaling, and Java/Playwright browser tests. Despite its complexity, the repository demonstrates solid engineering practices with clear separation of concerns, reusable shell libraries, and automated dependency management via Renovate and Dependabot.

RATING9.2/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS227
VELOCITY0.96
OPEN ISSUES94
CLOSED ISSUES1611
LAST COMMIT2 days ago
Files by Type (count)
Markdown
3262
YAML
185
Shell
65
Python
39
Go
27
Dockerfile
23
Other (no ext)
18
Config
18
Other (.png)
9
JSON
8
TOML
8
Git Ignore
5
Files by Type (size)
Markdown
4MB
YAML
658KB
Go
447KB
Other (.png)
440KB
Python
309KB
Shell
262KB
Makefile
107KB
JSON
97KB
Other (.tpl)
59KB
Dockerfile
51KB
Other (.jar)
42KB
Other (no ext)
25KB

The LLM identified 4 files worth highlighting for reuse:

A self-contained Go Prometheus exporter that implements a custom collector to scrape Selenium Grid's GraphQL endpoint and expose metrics (nodes, sessions, queue depth, session lifecycle timestamps). It has its own go.mod, is built as a standalone binary, and can be extracted as a reusable pattern for any service with a similar GraphQL API. The architecture separates GraphQL query construction, response parsing, and Prometheus metric collection into distinct files.

file: .monitoring/exporter/ ↗ | tags: #prometheus-exporter #graphql-client #custom-collector

A complete, self-contained KEDA external scaler implementation in Go. It implements the ExternalScaler gRPC service, communicating with the Selenium Grid GraphQL endpoint to determine scaling needs based on session queue length and node availability. The code is cleanly organized into separated packages: metadata parsing, core scaling logic, platform mapping, and gRPC server. It has its own Dockerfile and Makefile, and could be adapted to scale other distributed systems by replacing the GraphQL query and logic.

file: .keda-external-scaler/ ↗ | tags: #keda-scaler #grpc-server #autoscaling

An event-driven video recording service that subscribes to Selenium Grid's ZeroMQ event bus (session-created, session-closed) and manages concurrent ffmpeg processes to record browser sessions. It handles graceful shutdown via SIGTERM, uploads recordings using rclone, and supports session subfolder organization. The design pattern of subscribing to external events, managing child process lifecycles, and implementing a state machine for video file naming and rotation is reusable for any service that needs to capture streams or logs tied to session lifecycles.

file: Video/video_recorder.py ↗ | tags: #event-driven #zmq #process-management

A shell script that serves as the container entry point for all Selenium Grid images. It configures environment variables, sets up signal forwarding (SIGTERM/SIGINT) to supervisord for graceful shutdown, handles SELINUX and TZ variables, and generates a unique SE_OTEL_SERVICE_ID. The pattern of using trap to relay signals to a child process manager is generic and could be reused in any containerized application that requires proper shutdown sequencing.

file: Base/entry_point.sh ↗ | tags: #container-entrypoint #supervisor #signal-handling
Last analyzed: 2026-10-15 18:19:47.285817
Next check: 2026-10-22 18:19:47.270038
$ submit: