[base]
path = {base}
default = master,manager,operater
network = overlay_dm
subnet = 10.0.0.0/255

;别名注册，使用 dm run daemon-run
[alias]
run = master,manager,operater
join = client,worker

[redis]
;port = 6379:6379,8888:8888
memory = 2048M
volumes = {container}conf/db/redis/redis.conf:/etc/redis.conf
command = redis
alias = redis->redis-cli

;服务注册
[master]
image = consul
port = 8500:8500
volumes = {container}conf/service/consul:/root/consul/config
command = consul -server -bootstrap-expect 3 -data-dir=/root/consul/data -config-dir=/root/consul/config -client=0.0.0.0 -node={name} -dc={name}
alias = consul
slave = 2
slave_command = consul -server -data-dir=/root/consul/data -config-dir=/root/consul/config -client=0.0.0.0 -join={parent} -dc={parent}

;服务发现
[client]
image = consul
volumes = {container}conf/service/consul:/root/consul/config
command = consul -data-dir=/root/consul/data -client=0.0.0.0 -join={parent} -dc=daemon-master
alias = consul->consul_client

;任务管理
[crond]
image = alpine_daemon
command = daemon

;文件共享与管理者
[manager]
image = btsync
volumes = {container}share/lib:/data
;获取超级管理权限
;super = true

;文件发现 dm run daemon-worker input=A4IDCT5EADNLSWEZ3V5C3ONPGBBGEUDJD
[worker]
image = btsync
command = {$input:A4IDCT5EADNLSWEZ3V5C3ONPGBBGEUDJD}
volumes = {container}share/lib:/data

;操作者，图形界面后台，可以直接访问daemon-manager
[operater]
image = admin
port = 9091:8087,9092:8088
volumes = {container}web:/web
command = admin

;master、manager、operater、crond为主机开启
;client、worker为其他机器开启