-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy paths01c2_start_grid_dcompose.sh
executable file
·41 lines (33 loc) · 1.07 KB
/
s01c2_start_grid_dcompose.sh
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
#!/usr/bin/env bash
#load common config
source ./s00_common.sh
SCALE_PARAMS=$1
#start the grid = hub + 02 nodes (chrome, firefox) via docker compose ref. https://testdetective.com/selenium-grid-with-docker/ and https://gist.github.com/lroslonek/1f5ca6af7e1fbffa914a
docker_compose="
$HUB_NAME:
image: $HUB_DIMG
ports:
- 4444:4444
#restart: always #TODO consider to put this in ref. https://gist.github.com/manoj9788/67e248064c89d622cadc6192c66b184d
$NODE_NAME_CH:
image: $NODE_DIMG_CH
ports:
- 5900
links:
- $HUB_NAME:hub
#restart: always #TODO consider to put this in ref. https://gist.github.com/manoj9788/67e248064c89d622cadc6192c66b184d
$NODE_NAME_FF:
image: $NODE_DIMG_FF
ports:
- 5900
links:
- $HUB_NAME:hub
#restart: always #TODO consider to put this in ref. https://gist.github.com/manoj9788/67e248064c89d622cadc6192c66b184d
"
DOCKER_COMPOSE_FILE='docker-compose.yml'
echo "$docker_compose" > $DOCKER_COMPOSE_FILE
docker-compose up -d --force-recreate $SCALE_PARAMS
echo "
Open selenium console
http://localhost:$HUB_PORT/grid/console
"