1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-25 00:08:49 +00:00
dockerfiles/selenium/docker-stack.yml

61 lines
1.3 KiB
YAML
Raw Normal View History

2022-01-11 04:00:53 +00:00
#
# https://github.com/SeleniumHQ/docker-selenium/blob/trunk/docker-compose-v3-swarm.yml
#
# cluster:
# - manger: 1 (4vCPU, 4GiB MEM)
# - worker: 10 (8vCPU, 8GiB MEM)
#
2021-05-28 08:16:06 +00:00
version: '3.8'
2019-11-03 04:01:33 +00:00
2019-06-26 21:15:23 +00:00
services:
2019-11-03 04:01:33 +00:00
2019-06-26 21:15:23 +00:00
hub:
2022-01-11 04:00:53 +00:00
image: selenium/hub:4
2019-06-26 21:15:23 +00:00
ports:
2022-01-11 04:00:53 +00:00
- "4442:4442"
- "4443:4443"
2019-06-26 21:15:23 +00:00
- "4444:4444"
2019-08-04 05:04:08 +00:00
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
restart_policy:
condition: on-failure
2019-11-03 04:01:33 +00:00
2019-08-04 05:04:08 +00:00
chrome:
2022-01-11 04:00:53 +00:00
image: selenium/node-chrome:4
entrypoint: bash -c 'SE_OPTS="--host $$HOSTNAME" /opt/bin/entry_point.sh'
2019-08-04 05:04:08 +00:00
volumes:
2022-01-11 04:00:53 +00:00
- type: tmpfs
target: /dev/shm
tmpfs:
size: 2147483648 # numfmt --from=iec 2G
2019-08-04 05:04:08 +00:00
environment:
2022-01-11 04:00:53 +00:00
- SE_EVENT_BUS_HOST=hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
- SE_NODE_MAX_SESSIONS=8
- SE_NODE_SESSION_TIMEOUT=180
- START_XVFB=true
2022-01-11 09:33:20 +00:00
- VNC_NO_PASSWORD=1
- VNC_VIEW_ONLY=1
2019-06-26 21:15:23 +00:00
depends_on:
- hub
deploy:
2022-01-11 04:00:53 +00:00
replicas: 10
2019-06-26 21:15:23 +00:00
placement:
2022-01-11 04:00:53 +00:00
max_replicas_per_node: 1
2019-06-26 21:15:23 +00:00
constraints:
- node.role == worker
restart_policy:
condition: on-failure
2019-11-03 04:01:33 +00:00
2019-06-26 21:15:23 +00:00
networks:
default:
ipam:
config:
2019-08-04 05:04:08 +00:00
- subnet: 192.168.100.0/24