-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
51 lines (47 loc) · 1.27 KB
/
docker-compose.yml
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
version: '3.8'
services:
pytest-host:
container_name: pytest-host
build: .
depends_on:
- selenium-hub
- selenium-firefox
entrypoint: [
"./wait-for-it.sh", "-t", "15", "selenium-firefox:5555", "--", "pytest",
"--remote", "--rmt-host=selenium-hub", "--rmt-port=4444"
]
# the wait-for-it.sh command makes the container wait until the Selenium containers are ready to work
command: [ "-n2" ]
# There will be "-n" tests running in parallel
volumes:
- ./remote_reports/:/selenium_tests/reports/
networks:
selenium_net: {}
selenium-hub:
container_name: selenium-hub
image: selenium/hub:3.141.59
ports:
- "4444:4444"
networks:
selenium_net: {}
selenium-firefox:
container_name: selenium-firefox
image: selenium/node-firefox${DEBUG:-}:3.141.59
volumes:
- /dev/shm:/dev/shm
depends_on:
- selenium-hub
environment:
- HUB_HOST=selenium-hub
- HUB_PORT=4444
- NODE_MAX_INSTANCES=3 # If not set, tests won't be concurrently run
- NODE_MAX_SESSION=3 # If not set, tests won't be concurrently run
networks:
selenium_net: {}
ports:
- "5900:5900"
expose:
- 5555
networks:
selenium_net:
driver: bridge