Skip to content

Instantly share code, notes, and snippets.

@pshynin
Created January 24, 2019 21:40
Show Gist options
  • Save pshynin/f965d36447682f19d52b7294382163dd to your computer and use it in GitHub Desktop.
Save pshynin/f965d36447682f19d52b7294382163dd to your computer and use it in GitHub Desktop.
Example of the compose file to create selenium grid
# docker-compose yml file use `docker-compose -f <file_name> up`
# Add the `-d` flag at the end for detached execution
# Jenkins should use `docker-compose -f jenkins/Compose.yaml up -d && docker-compose -f jenkins/Compose.yaml scale chrome=4 firefox=4`
version: '2'
services:
firefox:
image: selenium/node-firefox-debug:3.14.0-europium
volumes:
- /dev/shm:/dev/shm
- /Users/pshynin/Downloads:/home/seluser/Downloads
depends_on:
- hub
environment:
HUB_HOST: hub
SCREEN_WIDTH: 1920
SCREEN_HEIGHT: 1200
ports:
- 30000:5900
chrome:
image: selenium/node-chrome-debug:3.14.0-europium
volumes:
- /dev/shm:/dev/shm
- /Users/pshynin/Downloads:/home/seluser/Downloads
depends_on:
- hub
environment:
HUB_HOST: hub
SCREEN_WIDTH: 1920
SCREEN_HEIGHT: 1200
ports:
- 30001:5900
hub:
image: selenium/hub:3.14.0-europium
volumes:
- /dev/shm:/dev/shm
ports:
- "4444:4444"
environment:
- "GRID_MAX_SESSION=4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment