1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:50 +02:00
dockerfiles/prestosql/docker-stack.yml
2019-10-21 22:14:09 +08:00

51 lines
1.0 KiB
YAML

version: "3.7"
services:
coordinator:
image: vimagick/prestosql:alpine
ports:
- "8080:8080"
volumes:
- /data:/data
- prestosql_coordinator_conf:/opt/presto/etc
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
restart_policy:
condition: on-failure
worker:
image: vimagick/prestosql:alpine
entrypoint: sh -c 'launcher run -Dnode.id=$$HOSTNAME'
volumes:
- /data:/data
- prestosql_worker_conf:/opt/presto/etc
deploy:
replicas: 0
placement:
constraints:
- node.role == worker
restart_policy:
condition: on-failure
depends_on:
- coordinator
volumes:
prestosql_coordinator_conf:
driver: local
driver_opts:
type: nfs
o: "addr=10.0.0.1,nolock,soft,ro"
device: ":/export/prestosql/coordinator"
prestosql_worker_conf:
driver: local
driver_opts:
type: nfs
o: "addr=10.0.0.1,nolock,soft,ro"
device: ":/export/prestosql/worker"