1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/selenium/docker-stack.yml

59 lines
1.2 KiB
YAML
Raw Normal View History

2022-01-11 06:00:53 +02: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 10:16:06 +02:00
version: '3.8'
2019-11-03 06:01:33 +02:00
2019-06-26 23:15:23 +02:00
services:
2019-11-03 06:01:33 +02:00
2019-06-26 23:15:23 +02:00
hub:
2022-01-11 06:00:53 +02:00
image: selenium/hub:4
2019-06-26 23:15:23 +02:00
ports:
2022-01-11 06:00:53 +02:00
- "4442:4442"
- "4443:4443"
2019-06-26 23:15:23 +02:00
- "4444:4444"
2019-08-04 07:04:08 +02:00
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
restart_policy:
condition: on-failure
2019-11-03 06:01:33 +02:00
2019-08-04 07:04:08 +02:00
chrome:
2022-01-11 06:00:53 +02:00
image: selenium/node-chrome:4
entrypoint: bash -c 'SE_OPTS="--host $$HOSTNAME" /opt/bin/entry_point.sh'
2019-08-04 07:04:08 +02:00
volumes:
2022-01-11 06:00:53 +02:00
- type: tmpfs
target: /dev/shm
tmpfs:
size: 2147483648 # numfmt --from=iec 2G
2019-08-04 07:04:08 +02:00
environment:
2022-01-11 06:00:53 +02: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
2019-06-26 23:15:23 +02:00
depends_on:
- hub
deploy:
2022-01-11 06:00:53 +02:00
replicas: 10
2019-06-26 23:15:23 +02:00
placement:
2022-01-11 06:00:53 +02:00
max_replicas_per_node: 1
2019-06-26 23:15:23 +02:00
constraints:
- node.role == worker
restart_policy:
condition: on-failure
2019-11-03 06:01:33 +02:00
2019-06-26 23:15:23 +02:00
networks:
default:
ipam:
config:
2019-08-04 07:04:08 +02:00
- subnet: 192.168.100.0/24