forked from rchovatiya88/docker-selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-scales.yml
58 lines (55 loc) · 1.29 KB
/
docker-compose-scales.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
52
53
54
55
56
57
58
# The purpose of this -scales example is to run 1 hub, N chromes, N firefox
#
# Usage:
# docker-compose -f docker-compose-scales.yml -p grid up --force-recreate
# How to scale it:
# docker-compose -f docker-compose-scales.yml -p grid scale hub=1 chrome=2 firefox=1
version: '3'
services:
hub:
image: elgalu/selenium
ports:
- 4444:4444
volumes:
- /dev/shm:/dev/shm
privileged: true
environment:
- SELENIUM_HUB_HOST=hub
- SELENIUM_HUB_PORT=4444
- GRID=true
- CHROME=false
- FIREFOX=false
chrome:
image: elgalu/selenium
depends_on:
- hub
volumes:
- /dev/shm:/dev/shm
privileged: true
environment:
- SELENIUM_HUB_HOST=hub
- SELENIUM_HUB_PORT=4444
- SELENIUM_NODE_HOST={{CONTAINER_IP}}
- SCREEN_WIDTH=1300
- SCREEN_HEIGHT=999
- VIDEO=false
- GRID=false
- CHROME=true
- FIREFOX=false
firefox:
image: elgalu/selenium
depends_on:
- hub
volumes:
- /dev/shm:/dev/shm
privileged: true
environment:
- SELENIUM_HUB_HOST=hub
- SELENIUM_HUB_PORT=4444
- SELENIUM_NODE_HOST={{CONTAINER_IP}}
- SCREEN_WIDTH=1300
- SCREEN_HEIGHT=999
- VIDEO=false
- GRID=false
- CHROME=false
- FIREFOX=true