Skip to content

Commit 23a351a

Browse files
Zadjad RezaiXcalizorz
Zadjad Rezai
and
Xcalizorz
authored
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 <[email protected]>
1 parent c721541 commit 23a351a

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

Hub/example-config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[router]
2+
username = "admin"
3+
password = "myStrongPassword"

Hub/start-selenium-grid-hub.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
3636
--session-retry-interval ${SE_SESSION_RETRY_INTERVAL} \
3737
--relax-checks ${SE_RELAX_CHECKS} \
3838
--bind-host ${SE_BIND_HOST} \
39+
--config /opt/selenium/config.toml \
3940
${HOST_CONFIG} \
4041
${PORT_CONFIG} \
4142
${SE_OPTS}

docker-compose-v3-basicauth.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3.yml up`
2+
# Add the `-d` flag at the end for detached execution
3+
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3.yml down`
4+
version: "3"
5+
services:
6+
chrome:
7+
image: selenium/node-chrome:4.7.2-20221219
8+
shm_size: 2gb
9+
depends_on:
10+
- selenium-hub
11+
environment:
12+
- SE_EVENT_BUS_HOST=selenium-hub
13+
- SE_EVENT_BUS_PUBLISH_PORT=4442
14+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
15+
16+
edge:
17+
image: selenium/node-edge:4.7.2-20221219
18+
shm_size: 2gb
19+
depends_on:
20+
- selenium-hub
21+
environment:
22+
- SE_EVENT_BUS_HOST=selenium-hub
23+
- SE_EVENT_BUS_PUBLISH_PORT=4442
24+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
25+
26+
firefox:
27+
image: selenium/node-firefox:4.7.2-20221219
28+
shm_size: 2gb
29+
depends_on:
30+
- selenium-hub
31+
environment:
32+
- SE_EVENT_BUS_HOST=selenium-hub
33+
- SE_EVENT_BUS_PUBLISH_PORT=4442
34+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
35+
36+
selenium-hub:
37+
image: selenium/hub:4.7.2-20221219
38+
container_name: selenium-hub
39+
ports:
40+
- "4442:4442"
41+
- "4443:4443"
42+
- "4444:4444"
43+
volumes:
44+
- ./Hub/example-config.toml:/opt/selenium/config.toml

0 commit comments

Comments
 (0)