-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.grid.yml
More file actions
64 lines (60 loc) · 1.84 KB
/
Copy pathdocker-compose.grid.yml
File metadata and controls
64 lines (60 loc) · 1.84 KB
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
62
63
64
# Selenium Grid for cross-browser runs.
#
# docker compose -f docker-compose.grid.yml up -d
# ./mvnw test -Pgrid -Dbrowser=firefox
# docker compose -f docker-compose.grid.yml down
#
# The console at http://localhost:4444 shows live sessions; noVNC on the
# node ports lets you watch a headed browser while it runs.
services:
selenium-hub:
image: selenium/hub:4.33
container_name: selenium-hub
ports:
- "4442:4442" # event bus publish
- "4443:4443" # event bus subscribe
- "4444:4444" # grid console and WebDriver endpoint
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4444/wd/hub/status"]
interval: 10s
timeout: 5s
retries: 5
chrome:
image: selenium/node-chrome:4.33
depends_on:
- selenium-hub
shm_size: 2gb # the default 64MB makes Chrome crash mid-session
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_MAX_SESSIONS=3 # must be >= the suite's thread-count
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
ports:
- "7900:7900" # noVNC — password "secret"
firefox:
image: selenium/node-firefox:4.33
depends_on:
- selenium-hub
shm_size: 2gb
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_MAX_SESSIONS=3
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
ports:
- "7901:7900"
edge:
image: selenium/node-edge:4.33
depends_on:
- selenium-hub
shm_size: 2gb
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_MAX_SESSIONS=3
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
ports:
- "7902:7900"