1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 03:48:44 +00:00

add docker-stack.yml

This commit is contained in:
kev 2019-06-27 05:15:23 +08:00
parent efa6e24a5c
commit da1cdb7dd6
3 changed files with 122 additions and 0 deletions

@ -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

45
selenium/docker-stack.yml Normal file

@ -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

52
splash/docker-stack.yml Normal file

@ -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