Adapt for new wait_for
This commit is contained in:
parent
65e1b487a8
commit
f5e09c4ffd
|
@ -18,9 +18,7 @@ job "[[ .mariadb.instance ]]-manage" {
|
|||
[[ template "common/connect.tpl" $c ]]
|
||||
}
|
||||
|
||||
[[ template "common/task.wait_for.tpl" dict
|
||||
"ctx" .
|
||||
"wait_for" (coll.Slice (dict "service" .mariadb.instance)) ]]
|
||||
[[ template "common/task.wait_for.tpl" $c ]]
|
||||
|
||||
task "manage" {
|
||||
driver = [[ $c.nomad.driver | toJSON ]]
|
||||
|
|
|
@ -180,9 +180,7 @@ _EOT
|
|||
[[ template "common/connect.tpl" $c ]]
|
||||
}
|
||||
|
||||
[[ template "common/task.wait_for.tpl" dict
|
||||
"ctx" .
|
||||
"wait_for" (coll.Slice (dict "service" .mariadb.instance)) ]]
|
||||
[[ template "common/task.wait_for.tpl" $c ]]
|
||||
|
||||
task "backup" {
|
||||
driver = [[ $c.nomad.driver | toJSON ]]
|
||||
|
|
|
@ -52,6 +52,10 @@ mariadb:
|
|||
cpu: 10
|
||||
memory: 64
|
||||
|
||||
# Service to wait for
|
||||
wait_for:
|
||||
- service: '[[ .mariadb.instance ]]'
|
||||
|
||||
# Custom env vars to pass to the container
|
||||
env: {}
|
||||
|
||||
|
@ -88,6 +92,9 @@ mariadb:
|
|||
cpu: 200
|
||||
memory: 128
|
||||
|
||||
wait_for:
|
||||
- service: '[[ .mariadb.instance ]]'
|
||||
|
||||
# Consul settings
|
||||
consul:
|
||||
connect:
|
||||
|
|
Loading…
Reference in New Issue