From fc5f764eab37a703d57b93b066ff829400c6b635 Mon Sep 17 00:00:00 2001 From: kev Date: Fri, 10 May 2019 15:31:34 +0800 Subject: [PATCH] add selenium-grid --- selenium/grid/docker-compose-hub.yml | 20 ++++++++++++++++++++ selenium/grid/docker-compose-node.yml | 13 +++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 selenium/grid/docker-compose-hub.yml create mode 100644 selenium/grid/docker-compose-node.yml diff --git a/selenium/grid/docker-compose-hub.yml b/selenium/grid/docker-compose-hub.yml new file mode 100644 index 0000000..57fa764 --- /dev/null +++ b/selenium/grid/docker-compose-hub.yml @@ -0,0 +1,20 @@ +version: '3' + +services: + + selenium-hub: + image: selenium/hub:3.141.59-neon + ports: + - "4444:4444" + volumes: + - /dev/shm:/dev/shm + environment: + - JAVA_OPTS=-Xmx512m + - GRID_TIMEOUT=60 + - GRID_BROWSER_TIMEOUT=30 + healthcheck: + test: ["CMD", "/opt/bin/check-grid.sh", "--host", "127.0.0.1", "--port", "4444"] + interval: 15s + timeout: 30s + retries: 5 + restart: unless-stopped diff --git a/selenium/grid/docker-compose-node.yml b/selenium/grid/docker-compose-node.yml new file mode 100644 index 0000000..b5941ef --- /dev/null +++ b/selenium/grid/docker-compose-node.yml @@ -0,0 +1,13 @@ +chrome: + image: selenium/node-chrome:3.141.59-neon + ports: + - "5555:5555" + volumes: + - /dev/shm:/dev/shm + environment: + - HUB_HOST=10.0.0.21 + - HUB_PORT=4444 + - REMOTE_HOST=http://10.0.0.22:5555 + - NODE_MAX_INSTANCES=2 + - NODE_MAX_SESSION=2 + restart: unless-stopped