diff --git a/browserless/docker-stack.yml b/browserless/docker-stack.yml new file mode 100644 index 0000000..22ed886 --- /dev/null +++ b/browserless/docker-stack.yml @@ -0,0 +1,25 @@ +version: '3.5' +services: + browserless: + image: browserless/chrome:latest + ports: + - "3000:3000" + environment: + - DEBUG=browserless/chrome + - MAX_CONCURRENT_SESSIONS=10 + - CONNECTION_TIMEOUT=300000 + - MAX_QUEUE_LENGTH=10 + - ENABLE_CORS=true + - EXIT_ON_HEALTH_FAILURE=true + deploy: + resources: + limits: + memory: 1024M + replicas: 56 + restart_policy: + condition: on-failure +networks: + default: + ipam: + config: + - subnet: 192.168.128.0/24 diff --git a/selenium/docker-stack.yml b/selenium/docker-stack.yml new file mode 100644 index 0000000..7c15e73 --- /dev/null +++ b/selenium/docker-stack.yml @@ -0,0 +1,45 @@ +version: '3.5' +services: + hub: + image: selenium/hub:3.141.59-radium + ports: + - "4444:4444" + volumes: + - /dev/shm:/dev/shm + environment: + - JAVA_OPTS=-Xmx512m + - GRID_TIMEOUT=60 + - GRID_BROWSER_TIMEOUT=30 + deploy: + replicas: 1 + placement: + constraints: + - node.role == manager + restart_policy: + condition: on-failure + chrome: + image: selenium/node-chrome:3.141.59-radium + ports: + - "5555:5555" + volumes: + - /dev/shm:/dev/shm + environment: + - HUB_HOST=hub + - HUB_PORT=4444 + - REMOTE_HOST=http://{{.Task.Name}}:5555 + - NODE_MAX_INSTANCES=4 + - NODE_MAX_SESSION=4 + depends_on: + - hub + deploy: + replicas: 8 + placement: + constraints: + - node.role == worker + restart_policy: + condition: on-failure +networks: + default: + ipam: + config: + - subnet: 192.168.127.0/24 diff --git a/splash/docker-stack.yml b/splash/docker-stack.yml new file mode 100644 index 0000000..14c413b --- /dev/null +++ b/splash/docker-stack.yml @@ -0,0 +1,52 @@ +version: '3.5' +services: + splash: + image: scrapinghub/splash:3.3.1 + command: --maxrss 2048 --max-timeout 300 --disable-lua-sandbox --verbosity 1 + ports: + - "8050:8050" + volumes: + - splash_filters:/etc/splash/filters + - splash_js-profiles:/etc/splash/js-profiles + - splash_lua_modules:/etc/splash/lua_modules + - splash_proxy-profiles:/etc/splash/proxy-profiles + deploy: + resources: + limits: + memory: 2560M + replicas: 8 + placement: + constraints: + - node.role == worker + restart_policy: + condition: on-failure +volumes: + splash_filters: + driver: local + driver_opts: + type: nfs + o: "addr=10.0.0.96,nolock,soft,ro" + device: ":/export/splash/filters" + splash_js-profiles: + driver: local + driver_opts: + type: nfs + o: "addr=10.0.0.96,nolock,soft,ro" + device: ":/export/splash/js-profiles" + splash_lua_modules: + driver: local + driver_opts: + type: nfs + o: "addr=10.0.0.96,nolock,soft,ro" + device: ":/export/splash/lua_modules" + splash_proxy-profiles: + driver: local + driver_opts: + type: nfs + o: "addr=10.0.0.96,nolock,soft,ro" + device: ":/export/splash/proxy-profiles" +networks: + default: + ipam: + config: + - subnet: 192.168.126.0/24