forked from elgalu/docker-selenium
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
73 lines (70 loc) · 1.95 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# The purpose of this `docker-compose.yml` example is to run 1 hub, 1 chrome, 1 firefox
# i.e. this example doesn't scale, but there is another file for that: docker-compose-scales.yml
# i.e. this example doesn't support `docker-compose scale`
#
# If you try to scale this one you will get `Bind for 0.0.0.0:6080 failed: port is already allocated`
#
# Usage:
# docker-compose -p grid up --force-recreate
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
ports:
# VNC: See what's going on by connecting your VNC client to 0.0.0.0:5900
- 5900:25900
# noVNC: See what's going on by hitting http://0.0.0.0:6080 in your browser
# Important: http://127.0.0.1:6080 works but http://localhost:6080 doesn't
- 6080:26080
volumes:
- /dev/shm:/dev/shm
privileged: true
environment:
- NOVNC=true
- 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
ports:
# VNC: See what's going on by connecting your VNC client to 0.0.0.0:5901
- 5901:25900
# noVNC: See what's going on by hitting http://0.0.0.0:6081 in your browser
- 6081:26080
volumes:
- /dev/shm:/dev/shm
privileged: true
environment:
- NOVNC=true
- 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