1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00
dockerfiles/presto/docker-stack.yml
2019-09-28 13:06:26 +08:00

51 lines
1012 B
YAML

version: "3.7"
services:
coordinator:
image: vimagick/presto
ports:
- "8080:8080"
volumes:
- /data:/data
- presto_coordinator_conf:/opt/presto/etc
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
- node.hostname == presto-coordinator
restart_policy:
condition: on-failure
worker:
image: vimagick/presto
volumes:
- /data:/data
- presto_worker_conf:/opt/presto/etc
deploy:
replicas: 0
placement:
constraints:
- node.role == worker
restart_policy:
condition: on-failure
depends_on:
- coordinator
volumes:
presto_coordinator_conf:
driver: local
driver_opts:
type: nfs
o: "addr=10.0.0.1,nolock,soft,ro"
device: ":/export/presto/coordinator"
presto_worker_conf:
driver: local
driver_opts:
type: nfs
o: "addr=10.0.0.1,nolock,soft,ro"
device: ":/export/presto/worker"