Skip to content

Instantly share code, notes, and snippets.

@rothnic
Last active October 31, 2018 04:18
Show Gist options
  • Save rothnic/79e036ce4564a3ecb2708e248d163ceb to your computer and use it in GitHub Desktop.
Save rothnic/79e036ce4564a3ecb2708e248d163ceb to your computer and use it in GitHub Desktop.
Golem Docker-Compose Example - Selenium Grid - Headless Firefox and Chrome Device Configs
{
"remote_browsers": {
"chrome_remote_desktop_headless": {
"goog:chromeOptions": {
"args": ["--headless", "--disable-gpu", "--window-size=1366,768"]
},
"platform": "ANY",
"browserName": "chrome"
},
"chrome_remote_mobile_headless": {
"goog:chromeOptions": {
"args": [
"--headless",
"--disable-gpu",
"--window-size=412,732",
"--user-agent='Mozilla/5.0 (iPhone; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.25 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'"
]
},
"platform": "ANY",
"browserName": "chrome"
},
"firefox_remote_desktop": {
"browserName": "firefox",
"moz:firefoxOptions": { "args": ["--headless"] }
}
},
"remote_url": "http://selenium-hub:4444/wd/hub",
"screenshot_on_step": true
}
version: '3'
services:
selenium-hub:
image: selenium/hub:3.14.0-europium
container_name: selenium-hub
ports:
- "4444:4444"
environment:
- GRID_TIMEOUT=30
chrome:
image: selenium/node-chrome:3.14.0-europium
depends_on:
- selenium-hub
volumes:
- /dev/shm:/dev/shm
environment:
- HUB_HOST=selenium-hub
- HUB_PORT=4444
firefox:
image: selenium/node-firefox:3.14.0-europium
depends_on:
- selenium-hub
volumes:
- /dev/shm:/dev/shm
environment:
- HUB_HOST=selenium-hub
- HUB_PORT=4444
golem:
build: ./golem-docker
volumes:
- ./default:/golem
ports:
- "5000:5000"
depends_on:
- selenium-hub
FROM python:3
RUN pip install golem-framework
RUN mkdir /golem
ADD start_golem.sh /start_golem.sh
RUN chmod 777 /start_golem.sh
VOLUME /golem
WORKDIR /golem
CMD ["/start_golem.sh"]
#!/bin/bash
webdriver-manager update
golem gui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment