Allow adding config.toml to Selenium-Hub (#1757)

* Use config.toml in hub as well

Fixes #1754

* Add docker-compose demonstrating usage of config.toml

Co-authored-by: Xcalizorz <rzadjad@gmail.com>
This commit is contained in:
Zadjad Rezai
2022-12-29 14:49:37 +01:00
committed by GitHub
parent c721541a54
commit 23a351aa50
3 changed files with 48 additions and 0 deletions

3
Hub/example-config.toml Normal file
View File

@@ -0,0 +1,3 @@
[router]
username = "admin"
password = "myStrongPassword"

View File

@@ -36,6 +36,7 @@ java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
--session-retry-interval ${SE_SESSION_RETRY_INTERVAL} \
--relax-checks ${SE_RELAX_CHECKS} \
--bind-host ${SE_BIND_HOST} \
--config /opt/selenium/config.toml \
${HOST_CONFIG} \
${PORT_CONFIG} \
${SE_OPTS}

View File

@@ -0,0 +1,44 @@
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3.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.yml down`
version: "3"
services:
chrome:
image: selenium/node-chrome:4.7.2-20221219
shm_size: 2gb
depends_on:
- selenium-hub
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
edge:
image: selenium/node-edge:4.7.2-20221219
shm_size: 2gb
depends_on:
- selenium-hub
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
firefox:
image: selenium/node-firefox:4.7.2-20221219
shm_size: 2gb
depends_on:
- selenium-hub
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
selenium-hub:
image: selenium/hub:4.7.2-20221219
container_name: selenium-hub
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444"
volumes:
- ./Hub/example-config.toml:/opt/selenium/config.toml